Comparing version 0.5.1 to 0.5.2
@@ -24,15 +24,21 @@ /** | ||
} else { | ||
Object.keys(movedMethods).forEach(function (methodName) { | ||
var warnedOnce = false; | ||
Object.defineProperty(module.exports, methodName, { | ||
get: function () { | ||
if (!warnedOnce) { | ||
console.warn('`' + methodName + '` has moved to the ' + | ||
'`fluxible-addons-react` package.'); | ||
warnedOnce = true; | ||
try { | ||
Object.keys(movedMethods).forEach(function (methodName) { | ||
var warnedOnce = false; | ||
Object.defineProperty(module.exports, methodName, { | ||
get: function () { | ||
if (!warnedOnce) { | ||
console.warn('`' + methodName + '` has moved to the ' + | ||
'`fluxible-addons-react` package.'); | ||
warnedOnce = true; | ||
} | ||
return movedMethods[methodName]; | ||
} | ||
return movedMethods[methodName]; | ||
} | ||
}); | ||
}); | ||
}); | ||
} catch (e) { | ||
// https://github.com/es-shims/es5-shim#may-fail | ||
// Object.defineProperty will fail on IE8 | ||
objectAssign(module.exports, movedMethods); | ||
} | ||
} |
# Change Log | ||
## 0.5.2 | ||
### Bug Fixes | ||
* [#249] Updated `es6-promise`, `chai`, and `eslint` dependencies | ||
* [#248] Updated `object-assign` dependency | ||
## 0.5.1 | ||
@@ -4,0 +11,0 @@ |
@@ -8,3 +8,3 @@ /** | ||
var debug = require('debug')('Fluxible'); | ||
var PromiseLib = global.Promise || require('es6-promise').Promise; | ||
var PromiseLib = (global && global.Promise) || require('es6-promise').Promise; | ||
var isPromise = require('is-promise'); | ||
@@ -11,0 +11,0 @@ var FluxibleContext = require('./FluxibleContext'); |
@@ -9,3 +9,3 @@ /** | ||
var isPromise = require('is-promise'); | ||
var PromiseLib = global.Promise || require('es6-promise').Promise; | ||
var PromiseLib = (global && global.Promise) || require('es6-promise').Promise; | ||
var React = require('react'); | ||
@@ -12,0 +12,0 @@ var createElementWithContext = require('fluxible-addons-react/createElementWithContext'); |
{ | ||
"name": "fluxible", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "A pluggable container for isomorphic flux applications", | ||
@@ -18,6 +18,6 @@ "main": "index.js", | ||
"dispatchr": "^0.3.1", | ||
"es6-promise": "^2.0.1", | ||
"es6-promise": "^3.0.2", | ||
"fluxible-addons-react": "*", | ||
"is-promise": "^2.0.0", | ||
"object-assign": "^3.0.0", | ||
"object-assign": "^4.0.1", | ||
"setimmediate": "^1.0.2" | ||
@@ -27,5 +27,5 @@ }, | ||
"babel": "^5.0.2", | ||
"chai": "^2.0.0", | ||
"chai": "^3.2.0", | ||
"coveralls": "^2.11.1", | ||
"eslint": "^0.21.2", | ||
"eslint": "^1.2.1", | ||
"flux-router-component": "^0.6.0", | ||
@@ -32,0 +32,0 @@ "istanbul": "^0.3.2", |
@@ -45,4 +45,9 @@ # Fluxible | ||
import Fluxible from 'fluxible'; | ||
import {createStore} from 'fluxible/addons'; | ||
import { | ||
connectToStores, | ||
createElementWithContext, | ||
provideContext | ||
} from 'fluxible-addons-react'; | ||
import React from 'react'; | ||
import {connectToStores, createStore, provideContext} from 'fluxible/addons'; | ||
@@ -60,9 +65,9 @@ // Action | ||
}, | ||
initialize: () => { // Set the initial state | ||
initialize: function () { // Set the initial state | ||
this.foo = null; | ||
}, | ||
fooHandler: (payload) => { | ||
fooHandler: function (payload) { | ||
this.foo = payload; | ||
}, | ||
getState: () => { | ||
getState: function () { | ||
return { | ||
@@ -81,4 +86,4 @@ foo: this.foo | ||
App = provideContext(connectToStores(App, [FooStore], (stores, props) => { | ||
return stores.FooStore.getState(); | ||
App = provideContext(connectToStores(App, [FooStore], (context, props) => { | ||
return context.getStore(FooStore).getState(); | ||
})); | ||
@@ -95,3 +100,3 @@ | ||
context.executeAction(action, 'bar', (err) => { | ||
console.log(React.renderToString(context.createElement())); | ||
console.log(React.renderToString(createElementWithContext(context))); | ||
}); | ||
@@ -98,0 +103,0 @@ ``` |
@@ -11,2 +11,8 @@ # Upgrade Guide | ||
Note the new way to requre these with es6 uses curly braces: | ||
```js | ||
import {connectToStores} from 'fluxible-addons-react’;` | ||
``` | ||
### `connectToStores`'s `getStateFromStores` signature has changed to `(context, props)` | ||
@@ -13,0 +19,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42055
730
107
+ Addedes6-promise@3.3.1(transitive)
- Removedes6-promise@2.3.0(transitive)
- Removedobject-assign@3.0.0(transitive)
Updatedes6-promise@^3.0.2
Updatedobject-assign@^4.0.1