diff --git a/CHANGELOG.md b/CHANGELOG.md index 391ee2d..302a29c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,12 @@ and **contains migration instructions**. Release | What | *When* ---------|-------------------------------------------------|------------------ +[v1.0.0] | feature-u V1 Integration | *August 14, 2018* [v0.1.3] | Establish Polyfill Strategy | *July 2, 2018* [v0.1.0] | Initial Release | *March 6, 2018* +[v1.0.0]: #v100---feature-u-v1-integration-august-14-2018 [v0.1.3]: #v013---establish-polyfill-strategy-july-2-2018 [v0.1.0]: #v010---initial-release-march-6-2018 @@ -48,6 +50,45 @@ RUNNING CONTENT (pop out as needed) ... UNRELEASED ******************************************************************************** --> + + +## v1.0.0 - feature-u V1 Integration *(August 14, 2018)* + +[GitHub Content](https://github.com/KevinAst/feature-redux-logic/tree/v1.0.0) +• +[GitHub Release](https://github.com/KevinAst/feature-redux-logic/releases/tag/v1.0.0) +• +[Diff](https://github.com/KevinAst/feature-redux-logic/compare/v0.1.3...v1.0.0) + +**NOTE**: This release contains **breaking changes** from prior +releases _(i.e. a retrofit of client code is necessary)_. + +- **Added/Removed**: Eliminate singletons in favor of creators + + The singleton: `logicAspect`, has been replaced with a new creator: + `createLogicAspect()`. + + This is useful in both testing and server side rendering. + +- **Review**: Integrate to [**feature-u V1**](https://feature-u.js.org/cur/history.html#v1_0_0) + + **feature-u V1** has replaced the `app` object with a `fassets` + object. + + In general, this is not a change that would normally break a plugin, + because app/fassets is a positional parameter that is merely passed + through the plugin. + + However, because **feature-redux-logic** auto injects the [`Fassets + object`] as a dependency in your logic modules (promoting full + [Cross Feature Communication]), the logic modules in your + application code must reflect this change by renaming this named + parameter from `app` to `fassets`, and utilize the new fassets API + accordingly. Please refer to the [Usage] section for examples. + + As a result, this plugin has now updated it's **feature-u** + peerDependency to ">=1.0.0". + @@ -83,3 +124,12 @@ UNRELEASED ********************************************************************* [GitHub Release](https://github.com/KevinAst/feature-redux-logic/releases/tag/v0.1.0) **This is where it all began ...** + + + + + + +[`Fassets object`]: https://feature-u.js.org/cur/api.html#Fassets +[Cross Feature Communication]: https://feature-u.js.org/cur/crossCommunication.html +[Usage]: README.md#usage diff --git a/README.md b/README.md index 2f37fc3..0a10349 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Let's see how this all works together ... npm install --save redux-logic ``` @@ -98,16 +98,16 @@ Polyfills](#potential-need-for-polyfills))_. **src/app.js** ```js - import {launchApp} from 'feature-u'; - import {reducerAspect} from 'feature-redux'; // **2** - import {logicAspect} from 'feature-redux-logic'; // **1** - import features from './feature'; + import {launchApp} from 'feature-u'; + import {createReducerAspect} from 'feature-redux'; // **2** + import {createLogicAspect} from 'feature-redux-logic'; // **1** + import features from './feature'; export default launchApp({ aspects: [ - reducerAspect, // **2** - logicAspect, // **1** + createReducerAspect(), // **2** + createLogicAspect(), // **1** ... other Aspects here ], @@ -140,6 +140,31 @@ Polyfills](#potential-need-for-polyfills))_. }); ``` +3. As a convenience, **feature-redux-logic** auto injects the + **feature-u** [`Fassets object`] as a dependency in your logic + modules. This promotes full [Cross Feature Communication]. + + The following example, demonstrates the availability of the + `fassets` named parameter: + + ```js + import {createLogic} from 'redux-logic'; + + export const someLogic = createLogic({ + + ... snip snip + + transform({getState, action, fassets}, next, reject) { + ... fassets may be used for cross-feature-communication + }, + + process({getState, action, fassets}, dispatch, done) { + ... fassets may be used for cross-feature-communication + } + + }); + ``` + **Well that was easy!!** At this point **redux-logic** is **completely setup for your application!** @@ -157,9 +182,9 @@ truly opaque assets _(internal to the feature)_, they are of interest to **feature-redux-logic** to the extent that they are needed to configure [redux-logic]. -Because logic modules may require access to **feature-u**'s [`App`] -object during code expansion, this property can also be a -**feature-u** [`managedExpansion()`] callback _(a function that +Because logic modules may require access to **feature-u**'s [`Fassets +object`] during code expansion, this property can also be a +**feature-u** [`expandWithFassets()`] callback _(a function that returns the logic modules)_ ... please refer to **feature-u**'s discussion of [Managed Code Expansion]. @@ -204,7 +229,7 @@ export const doSomething = createLogic({ ... snip snip }, - process({getState, action, app}, dispatch, done) { + process({getState, action, fassets}, dispatch, done) { ... snip snip } @@ -275,6 +300,11 @@ process (_i.e. the inputs and outputs_) are documented here. component must be consumed by yet another aspect (_such as [feature-redux]_) that in turn manages [redux]. +- As a convenience, **feature-redux-logic** auto injects the + **feature-u** [`Fassets object`] as a dependency in your logic + modules. This promotes full [Cross Feature Communication]. + Please refer to the [Usage] section for examples. + ### Error Conditions @@ -315,6 +345,8 @@ modules were specified by your features.