Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Migrate to fusion-core 0.3.0-x (DI API)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhorie authored and fusion-bot[bot] committed Jan 16, 2018
1 parent 97bc184 commit 0181219
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 27 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ export default withBatchEvents(Component);
```js
// main.js
import App from 'fusion-react';
import universalEvents from 'fusion-plugin-universal-events-react';
import UniversalEvents from 'fusion-plugin-universal-events-react';
import {FetchToken} from 'fusion-tokens';
import fetch from 'unfetch';

export default function() {
const app = new App(root);
const EventEmitter = app.plugin(universalEvents, {fetch});
const EventEmitter = app.register(UniversalEventsToken, UniversalEvents);
__BROWSER__ && app.configure(FetchToken, fetch);
return app;
}

```

#### `withBatchEvents`
Expand All @@ -64,9 +65,10 @@ export default function() {
import {withBatchEvents} from 'fusion-plugin-universal-events-react';

const Component = ({universalEvents}) => {
universalEvents.on('foo', payload => {console.log(payload)});
universalEvents.on('foo', payload => {
console.log(payload);
});
};

export default withBatchEvents(Component);

```
29 changes: 13 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
{
"name": "fusion-plugin-universal-events-react",
"description": "React Provider and HOC for Fusion universal-events",
"repository": "fusionjs/fusion-plugin-universal-events-react",
"version": "0.1.12",
"license": "MIT",
"repository": "fusionjs/fusion-plugin-universal-events-react",
"keywords": [],
"files": [
"dist"
],
"main": "./dist/node.cjs.js",
"module": "./dist/node.es.js",
"license": "MIT",
"files": ["dist", "src"],
"main": "./dist/index.js",
"module": "./dist/index.es.js",
"browser": {
"./dist/node.cjs.js": "./dist/browser.es5.cjs.js",
"./dist/node.es.js": "./dist/browser.es5.es.js"
"./dist/index.js": "./dist/browser.es5.js",
"./dist/index.es.js": "./dist/browser.es5.es.js"
},
"es2015": {
"./dist/browser.es5.cjs.js": "./dist/browser.es2015.cjs.js",
"./dist/browser.es5.es.js": "./dist/browser.es2015.es.js"
},
"es2017": {
"./dist/browser.es5.cjs.js": "./dist/browser.es2017.cjs.js",
"./dist/browser.es5.es.js": "./dist/browser.es2017.es.js",
"./dist/browser.es2015.cjs.js": "./dist/browser.es2017.cjs.js",
"./dist/browser.es2015.es.js": "./dist/browser.es2017.es.js"
},
"dependencies": {
Expand All @@ -37,18 +32,20 @@
"eslint-plugin-prettier": "2.4.0",
"eslint-plugin-react": "7.5.1",
"flow-bin": "0.63.1",
"fusion-core": "0.2.8",
"fusion-react": "0.1.10",
"fusion-core": "0.3.0-2",
"fusion-react": "0.2.0",
"fusion-react-async": "0.1.4",
"fusion-tokens": "0.0.4",
"nyc": "11.4.1",
"prettier": "1.10.2",
"react": "16.2.0",
"react-dom": "16.2.0",
"tape-cup": "4.7.1"
},
"peerDependencies": {
"fusion-core": "^0.2.3",
"fusion-react": "^0.1.9"
"fusion-core": "^0.3.0-2",
"fusion-react": "^0.2.0",
"fusion-tokens": "0.0.4"
},
"scripts": {
"clean": "rm -rf dist",
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ import withBatchEvents from './hoc';

export default plugin;
export {withBatchEvents};
export {UniversalEventsToken} from 'fusion-plugin-universal-events';
21 changes: 15 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2170,13 +2170,14 @@ functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"

fusion-core@0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/fusion-core/-/fusion-core-0.2.8.tgz#90413a044483a91143c6b8b800237b738a4f1495"
fusion-core@0.3.0-2:
version "0.3.0-2"
resolved "https://registry.yarnpkg.com/fusion-core/-/fusion-core-0.3.0-2.tgz#cbbe19f688d00b8a2ee948293e6098dbd1a10988"
dependencies:
koa "^2.3.0"
koa-compose "^4.0.0"
node-mocks-http "^1.6.6"
toposort "^1.0.6"

fusion-plugin-universal-events@^0.2.0:
version "0.2.0"
Expand All @@ -2190,9 +2191,13 @@ [email protected]:
dependencies:
prop-types "^15.5.8"

[email protected]:
version "0.1.10"
resolved "https://registry.yarnpkg.com/fusion-react/-/fusion-react-0.1.10.tgz#4970d9ed9ad1d4345dd3b8eb6a50fcd3bb69581f"
[email protected]:
version "0.2.0"
resolved "https://registry.yarnpkg.com/fusion-react/-/fusion-react-0.2.0.tgz#3363df120f145089a06b5965a668e4fb3aa9028b"

[email protected]:
version "0.0.4"
resolved "https://registry.yarnpkg.com/fusion-tokens/-/fusion-tokens-0.0.4.tgz#b84c58e2de8e06d3e63c2c182da7e023ccfb50ec"

gauge@~2.7.3:
version "2.7.4"
Expand Down Expand Up @@ -4290,6 +4295,10 @@ to-object-path@^0.3.0:
dependencies:
kind-of "^3.0.2"

toposort@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec"

tough-cookie@~2.3.0:
version "2.3.3"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561"
Expand Down

0 comments on commit 0181219

Please sign in to comment.