Skip to content

Commit 1f3c55f

Browse files
committed
Merge pull request #2 from rackt/master
Update from master
2 parents 0b5ca2b + b8c3cc4 commit 1f3c55f

File tree

214 files changed

+10448
-2361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+10448
-2361
lines changed

.eslintignore

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
lib
2-
node_modules
3-
examples/todomvc/node_modules
4-
examples/todomvc/server.js
5-
examples/todomvc/webpack.config.js
6-
examples/counter/node_modules
7-
examples/counter/server.js
8-
examples/counter/webpack.config.js
1+
lib/*
2+
**/dist/*
3+
**/node_modules/*
4+
**/server.js
5+
**/webpack.config*.js

.eslintrc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
2-
"extends": "eslint-config-airbnb",
2+
"extends": "airbnb",
33
"env": {
44
"browser": true,
55
"mocha": true,
66
"node": true
77
},
88
"rules": {
9+
"valid-jsdoc": 2,
10+
911
"react/jsx-uses-react": 2,
1012
"react/jsx-uses-vars": 2,
1113
"react/react-in-jsx-scope": 2,
1214

13-
//Temporarirly disabled due to a possible bug in babel-eslint (todomvc example)
14-
"block-scoped-var": 0,
15-
// Temporarily disabled for test/* until babel/babel-eslint#33 is resolved
16-
"padded-blocks": 0
15+
// Disable until Flow supports let and const
16+
"no-var": 0,
17+
"vars-on-top": 0,
18+
19+
// Disable comma-dangle unless need to support it
20+
"comma-dangle": 0
1721
},
1822
"plugins": [
1923
"react"

.flowconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[ignore]
2+
.*/lib
3+
.*/test
4+
5+
[include]
6+
7+
[libs]
8+
9+
[options]

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
node_modules
2-
npm-debug.log
31
.DS_Store
2+
*.log
3+
node_modules
44
dist
55
lib
66
coverage
7-
react.js
8-
react-native.js
7+
_book

.npmignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
src
1+
.DS_Store
2+
*.log
23
examples
4+
test
5+
coverage
6+
_book
7+
book.json
8+
docs

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
language: node_js
22
node_js:
3-
- "iojs"
3+
- "iojs-2"
4+
script:
5+
- npm run lint
6+
- npm test
7+
- npm run build:examples
8+
- npm run test:examples

CHANGELOG.md

Lines changed: 115 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,87 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6-
## [unreleased]
6+
## [1.0.1](https://github.com/rackt/redux/compare/v1.0.0...v1.0.1) - 2015/08/15
7+
8+
* Fixes “process is not defined” on React Native ([#525](https://github.com/rackt/redux/issues/525), [#526](https://github.com/rackt/redux/pull/526))
9+
* Removes dependencies on `invariant` and `warning` ([#528](https://github.com/rackt/redux/pull/528))
10+
* Fixes TodoMVC example ([#524](https://github.com/rackt/redux/issues/524), [#529](https://github.com/rackt/redux/pull/529))
11+
12+
## [1.0.0](https://github.com/rackt/redux/compare/v1.0.0-rc...v1.0.0) - 2015/08/14
13+
14+
### Breaking Changes
15+
16+
* If `dispatch` is attempted while reducer is executing, an error is thrown. Note that you can dispatch from lifecycle hooks just fine. It's only reducers that are not allowed to dispatch. (https://github.com/rackt/redux/issues/368)
17+
18+
### New Home
19+
20+
We moved under [rackt](https://github.com/rackt) Github org. This won't affect you, but the new official URL is https://github.com/rackt/redux. We did this because we share values, and we want to collaborate on creating better tools, libraries, documentation, and examples. Redux stays independent of React, but we will work closely with React Router community to figure out a better integration.
21+
22+
### Docs!
23+
24+
[We have real docs now.](http://rackt.github.io/redux/) There are a few missing pieces, but it's a terrific effort, so thanks to everybody who contributed in the past month to get this shipped. Thanks to [Gitbook](https://github.com/GitbookIO/gitbook) for providing great tooling, too.
25+
26+
### Examples!
27+
28+
There's been no shortage of great examples in [Awesome Redux](https://github.com/xgrommx/awesome-redux), but we're shipping two new built-in examples in 1.0. One of them is a [very simple async application](https://github.com/rackt/redux/tree/master/examples/async). Creating it is covered in [async tutorial](http://rackt.github.io/redux/docs/advanced/AsyncActions.html). Another example we ship is a [“real-world” example](https://github.com/rackt/redux/tree/master/examples/real-world). It's a port of somewhat well-known [flux-react-router-example](https://github.com/gaearon/flux-react-router-example) to Redux, and shows advanced techniques such as caching, data normalization, custom API middleware, and pagination. Hopefully this example will help answer some commonly asked questions.
29+
30+
### Other Improvements
31+
32+
* Unsubscribing during a dispatch is now fixed: https://github.com/rackt/redux/pull/462
33+
* `bindActionCreators` now can also accept a function as the first argument: https://github.com/rackt/redux/pull/352
34+
* Dispatching from iframe now works: https://github.com/rackt/redux/issues/304
35+
* Symbols can be used as action types: https://github.com/rackt/redux/pull/295 (Note: we don't recommend you to do this, because they're not serializable, so you can't record/replay user sessions.)
36+
37+
## [1.0.0-rc](https://github.com/rackt/redux/compare/v1.0.0-alpha...v1.0.0-rc) - 2015/07/13
38+
39+
### Big Changes
40+
41+
* React-specific code has been moved to [react-redux](https://github.com/rackt/react-redux) and will be versioned separately
42+
* `createStore` no longer implicitly combines reducers
43+
* All middleware is now “smart” middleware
44+
* `createStore` no longer accepts middleware
45+
* The thunk middleware is no longer included by default
46+
47+
### Correctness Changes
48+
49+
* `combineReducers` now throws if you return `undefined` state
50+
* `combineReducers` throws if you have no `default` case
51+
* (React) Components now update correctly in response to the actions fired in `componentDidMount`
52+
* Dispatch from the middleware sends the dispatch through the whole middleware chain
53+
54+
**Read the [detailed upgrade notes on the release page.](https://github.com/rackt/redux/releases/tag/v1.0.0-rc)**
55+
56+
## [1.0.0-alpha](https://github.com/rackt/redux/compare/v0.12.0...v1.0.0-alpha) - 2015/06/30
57+
58+
### Naming
59+
60+
* “Stateless Stores” are now called reducers. (https://github.com/rackt/redux/issues/137#issuecomment-114178411)
61+
* The “Redux instance” is now called “The Store”. (https://github.com/rackt/redux/issues/137#issuecomment-113252359)
62+
* The dispatcher is removed completely. (https://github.com/rackt/redux/pull/166#issue-90113962)
63+
64+
### API changes
65+
66+
* <s>`composeStores`</s> is now `composeReducers`.
67+
* <s>`createDispatcher`</s> is gone.
68+
* <s>`createRedux`</s> is now `createStore`.
69+
* `<Provider>` now accepts `store` prop instead of <s>`redux`</s>.
70+
* The new `createStore` signature is `createStore(reducer: Function | Object, initialState: any, middlewares: Array | ({ getState, dispatch }) => Array)`.
71+
* If the first argument to `createStore` is an object, `composeReducers` is automatically applied to it.
72+
* The “smart” middleware signature changed. It now accepts an object instead of a single `getState` function. The `dispatch` function lets you “recurse” the middleware chain and is useful for async: #113 (comment).
73+
74+
### Correctness changes
75+
76+
* The `dispatch` provided by the default thunk middleware now walks the whole middleware chain.
77+
* It is enforced now that raw Actions at the end of the middleware chain have to be plain objects.
78+
* Nested dispatches are now handled gracefully. (#110, #119)
79+
80+
### Internal changes
81+
82+
* The object in React context is renamed from <s>`redux`</s> to `store`.
83+
* Some tests are rewritten for clarity, focus and edge cases.
84+
* Redux in examples is now aliased to the source code for easier work on master.
85+
86+
**Read the [detailed upgrade notes on the release page.](https://github.com/rackt/redux/releases/tag/v1.0.0-alpha)**
787

888
## [0.12.0] - 2015/06/19
989
No breaking changes this time.
@@ -43,23 +123,23 @@ import { provide, Connector } from 'redux/react-native';
43123

44124
Changes introduced in 0.10.1:
45125

46-
* `Connector` now throws if `select` returns something other than a plain object (https://github.com/gaearon/redux/pull/85)
47-
* The custom dispatcher API is tweaked so `setState` now returns the state that was actually set. This makes custom dispatchers more composable. (https://github.com/gaearon/redux/pull/77)
126+
* `Connector` now throws if `select` returns something other than a plain object (https://github.com/rackt/redux/pull/85)
127+
* The custom dispatcher API is tweaked so `setState` now returns the state that was actually set. This makes custom dispatchers more composable. (https://github.com/rackt/redux/pull/77)
48128

49129
Happy reducing!
50130

51131
## [0.10.0] - 2015/06/13
52132
### Middleware
53133

54-
Redux 1.0 is within striking distance! Can you believe how quickly Redux has matured? @gaearon made the first commit only [14 days ago](https://github.com/gaearon/redux/commit/8bc14659780c044baac1432845fe1e4ca5123a8d).
134+
Redux 1.0 is within striking distance! Can you believe how quickly Redux has matured? @rackt made the first commit only [14 days ago](https://github.com/rackt/redux/commit/8bc14659780c044baac1432845fe1e4ca5123a8d).
55135

56136
The 0.10 release is a follow-up to 0.9, with a focus on what we're calling (at least for now) **middleware**.
57137

58-
You can read all about middleware [here](https://github.com/gaearon/redux/blob/master/docs/middleware.md). We plan to release some official middleware soon, but of course we'd also love to see middleware created by the community.
138+
You can read all about middleware [here](https://github.com/rackt/redux/blob/master/docs/middleware.md). We plan to release some official middleware soon, but of course we'd also love to see middleware created by the community.
59139

60140
### Breaking changes
61141

62-
Just a small one: Redux includes a feature that enables you to return a function from an action creator to perform asynchronous dispatches. The function receives a callback and `getState()` as parameters. This has behavior has been re-implemented as middleware and moved into a separate module called [`thunkMiddleware()`](https://github.com/gaearon/redux/blob/master/src/middleware/thunk.js). It is included automatically when using the `createRedux(stores)` shortcut, but not when using `createDispatcher()`.
142+
Just a small one: Redux includes a feature that enables you to return a function from an action creator to perform asynchronous dispatches. The function receives a callback and `getState()` as parameters. This has behavior has been re-implemented as middleware and moved into a separate module called [`thunkMiddleware()`](https://github.com/rackt/redux/blob/master/src/middleware/thunk.js). It is included automatically when using the `createRedux(stores)` shortcut, but not when using `createDispatcher()`.
63143

64144
### Tests
65145

@@ -190,7 +270,7 @@ New:
190270
* Fine-grained subscriptions via the new `<Connector select={fn}>` prop
191271
* Less surprising, more consistent API
192272

193-
Read the discussion: https://github.com/gaearon/redux/pull/46
273+
Read the discussion: https://github.com/rackt/redux/pull/46
194274

195275
## [0.7.0] - 2015/06/06
196276
* Change second parameter in callback-style action creator from `state` to `read: (Store) => state` (#44)
@@ -244,7 +324,7 @@ It also now accepts a second `transformProps` argument to be just as expressive
244324
* Add a few early invariants
245325
246326
## [0.5.0] - 2015/06/03
247-
* Store function names are no longer significant, but you have to pass an object with all your Stores to the `root` (or `Root`). Fixes https://github.com/gaearon/redux/issues/16
327+
* Store function names are no longer significant, but you have to pass an object with all your Stores to the `root` (or `Root`). Fixes https://github.com/rackt/redux/issues/16
248328
249329
```js
250330
import { root } from 'redux';
@@ -265,10 +345,10 @@ export default class TodoApp {
265345
```
266346
267347
## [0.4.0] - 2015/06/03
268-
* Bring decorators back, now on top of the lower-level container components (https://github.com/gaearon/redux/pull/15, thanks Florent)
348+
* Bring decorators back, now on top of the lower-level container components (https://github.com/rackt/redux/pull/15, thanks Florent)
269349
* Require `stores` passed to `Container` to be an array
270-
* Fix build on Windows (https://github.com/gaearon/redux/pull/11, thanks Mike)
271-
* Reduce context footprint (https://github.com/gaearon/redux/pull/12, thanks Florent again!)
350+
* Fix build on Windows (https://github.com/rackt/redux/pull/11, thanks Mike)
351+
* Reduce context footprint (https://github.com/rackt/redux/pull/12, thanks Florent again!)
272352
273353
## [0.3.1] - 2015/06/03
274354
* Remove old files from build
@@ -277,8 +357,8 @@ export default class TodoApp {
277357
Complete rewrite.
278358
279359
* **No more strings,** now using module bindings for injecting stores and actions
280-
* Only use decorator for top-level component, keep dumb components pure and testable (https://github.com/gaearon/redux/issues/5)
281-
* Remove transaction logic (will be re-implemented on top of https://github.com/gaearon/redux/issues/6)
360+
* Only use decorator for top-level component, keep dumb components pure and testable (https://github.com/rackt/redux/issues/5)
361+
* Remove transaction logic (will be re-implemented on top of https://github.com/rackt/redux/issues/6)
282362
283363
```js
284364
// The smart component may inject actions
@@ -315,27 +395,27 @@ Minor caveat: Store function names are now significant.
315395
316396
## 0.2.0 - 2015/06/02
317397
* Initial public release.
318-
See examples in [README](https://github.com/gaearon/redux/blob/master/README.md) and the
319-
[examples](https://github.com/gaearon/redux/tree/master/examples) folder.
398+
See examples in [README](https://github.com/rackt/redux/blob/master/README.md) and the
399+
[examples](https://github.com/rackt/redux/tree/master/examples) folder.
320400
Alpha quality :-)
321401
322-
[unreleased]: https://github.com/gaearon/redux/compare/v0.12.0...HEAD
323-
[0.12.0]: https://github.com/gaearon/redux/compare/v0.11.1...v0.12.0
324-
[0.11.1]: https://github.com/gaearon/redux/compare/v0.11.0...v0.11.1
325-
[0.11.0]: https://github.com/gaearon/redux/compare/v0.10.1...v0.11.0
326-
[0.10.1]: https://github.com/gaearon/redux/compare/v0.10.0...v0.10.1
327-
[0.10.0]: https://github.com/gaearon/redux/compare/v0.9.0...v0.10.0
328-
[0.9.0]: https://github.com/gaearon/redux/compare/v0.8.1...v0.9.0
329-
[0.8.1]: https://github.com/gaearon/redux/compare/v0.8.0...v0.8.1
330-
[0.8.0]: https://github.com/gaearon/redux/compare/v0.7.0...v0.8.0
331-
[0.7.0]: https://github.com/gaearon/redux/compare/v0.6.2...v0.7.0
332-
[0.6.2]: https://github.com/gaearon/redux/compare/v0.6.1...v0.6.2
333-
[0.6.1]: https://github.com/gaearon/redux/compare/v0.6.0...v0.6.1
334-
[0.6.0]: https://github.com/gaearon/redux/compare/v0.5.1...v0.6.0
335-
[0.5.1]: https://github.com/gaearon/redux/compare/v0.5.0...v0.5.1
336-
[0.5.0]: https://github.com/gaearon/redux/compare/v0.4.0...v0.5.0
337-
[0.4.0]: https://github.com/gaearon/redux/compare/v0.3.1...v0.4.0
338-
[0.3.1]: https://github.com/gaearon/redux/compare/v0.3.0...v0.3.1
339-
[0.3.0]: https://github.com/gaearon/redux/compare/v0.2.2...v0.3.0
340-
[0.2.2]: https://github.com/gaearon/redux/compare/v0.2.1...v0.2.2
341-
[0.2.1]: https://github.com/gaearon/redux/compare/v0.2.0...v0.2.1
402+
[unreleased]: https://github.com/rackt/redux/compare/v0.12.0...HEAD
403+
[0.12.0]: https://github.com/rackt/redux/compare/v0.11.1...v0.12.0
404+
[0.11.1]: https://github.com/rackt/redux/compare/v0.11.0...v0.11.1
405+
[0.11.0]: https://github.com/rackt/redux/compare/v0.10.1...v0.11.0
406+
[0.10.1]: https://github.com/rackt/redux/compare/v0.10.0...v0.10.1
407+
[0.10.0]: https://github.com/rackt/redux/compare/v0.9.0...v0.10.0
408+
[0.9.0]: https://github.com/rackt/redux/compare/v0.8.1...v0.9.0
409+
[0.8.1]: https://github.com/rackt/redux/compare/v0.8.0...v0.8.1
410+
[0.8.0]: https://github.com/rackt/redux/compare/v0.7.0...v0.8.0
411+
[0.7.0]: https://github.com/rackt/redux/compare/v0.6.2...v0.7.0
412+
[0.6.2]: https://github.com/rackt/redux/compare/v0.6.1...v0.6.2
413+
[0.6.1]: https://github.com/rackt/redux/compare/v0.6.0...v0.6.1
414+
[0.6.0]: https://github.com/rackt/redux/compare/v0.5.1...v0.6.0
415+
[0.5.1]: https://github.com/rackt/redux/compare/v0.5.0...v0.5.1
416+
[0.5.0]: https://github.com/rackt/redux/compare/v0.4.0...v0.5.0
417+
[0.4.0]: https://github.com/rackt/redux/compare/v0.3.1...v0.4.0
418+
[0.3.1]: https://github.com/rackt/redux/compare/v0.3.0...v0.3.1
419+
[0.3.0]: https://github.com/rackt/redux/compare/v0.2.2...v0.3.0
420+
[0.2.2]: https://github.com/rackt/redux/compare/v0.2.1...v0.2.2
421+
[0.2.1]: https://github.com/rackt/redux/compare/v0.2.0...v0.2.1

PATRONS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Patrons
2+
3+
The work on Redux was [funded by the community](https://www.patreon.com/reactdx).
4+
Meet some of the outstanding companies and individuals that made it possible:
5+
6+
* [Webflow](https://webflow.com/)
7+
* [Chess iX](http://www.chess-ix.com/)
8+
* [Herman J. Radtke III](http://hermanradtke.com)
9+
* [Ken Wheeler](http://kenwheeler.github.io/)
10+
* Chung Yen Li
11+
* [Sunil Pai](https://twitter.com/threepointone)
12+
* [Charlie Cheever](https://twitter.com/ccheever)
13+
* [Eugene G](https://twitter.com/e1g)
14+
* [Matt Apperson](https://twitter.com/mattapperson)
15+
* [Jed Watson](https://twitter.com/jedwatson)
16+
* [Sasha Aickin](https://twitter.com/xander76)

0 commit comments

Comments
 (0)