Skip to content

Commit

Permalink
Drop CALL_API alias
Browse files Browse the repository at this point in the history
BREAKING CHANGE that is part of the 3.x release
  • Loading branch information
nason committed Jun 10, 2018
1 parent 750524f commit e9c9527
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
10 changes: 9 additions & 1 deletion README.md
Expand Up @@ -132,6 +132,10 @@ We have tiptoed around error-handling issues here. For a thorough walkthrough of

See the [2.0 Release Notes](https://github.com/agraboso/redux-api-middleware/releases/tag/v2.0.0), and [Upgrading from v1.0.x](#upgrading-from-v10x) for details on upgrading.

### Breaking Changes in 3.0 Release

See the [3.0 Release Notes](https://github.com/agraboso/redux-api-middleware/releases/tag/v3.0.0), and [Upgrading from v2.0.x](#upgrading-from-v20x) for details on upgrading.

## Installation

`redux-api-middleware` is available on [npm](https://www.npmjs.com/package/redux-api-middleware).
Expand Down Expand Up @@ -399,7 +403,7 @@ See [the Redux docs on composition](https://github.com/reduxjs/redux-thunk#compo
export function patchAsyncExampleThunkChainedActionCreator(values) {
return async(dispatch, getState) => {
const actionResponse = await dispatch({
[CALL_API]: {
[RSAA]: {
endpoint: "...",
method: "PATCH",
body: JSON.stringify(values),
Expand Down Expand Up @@ -889,6 +893,10 @@ $ npm install && npm test
- A new `options` config is added to pass your `fetch` implementation extra options other than `method`, `headers`, `body` and `credentials`
- `apiMiddleware` no longer returns a promise on actions without [RSAA]

## Upgrading from v2.0.x

- The `CALL_API` alias has been removed

## License

MIT
Expand Down
4 changes: 0 additions & 4 deletions src/index.js
Expand Up @@ -3,7 +3,6 @@
* @module redux-api-middleware
* @requires lodash.isplainobject
* @exports {string} RSAA
* @exports {string} CALL_API - alias of RSAA, to be deprecated in v3
* @exports {function} isRSAA
* @exports {function} validateRSAA
* @exports {function} isValidRSAA
Expand Down Expand Up @@ -36,9 +35,6 @@ import { getJSON } from './util';
import { apiMiddleware } from './middleware';

export {
// Alias RSAA to CALL_API to smooth v1 - v2 migration
// TODO: Deprecate in v3
RSAA as CALL_API,
RSAA,
isRSAA,
validateRSAA,
Expand Down
6 changes: 0 additions & 6 deletions test/index.js
Expand Up @@ -5,7 +5,6 @@ import nock from 'nock';
// Public package exports
import {
RSAA,
CALL_API,
isRSAA,
validateRSAA,
isValidRSAA,
Expand All @@ -21,11 +20,6 @@ import {
import { isValidTypeDescriptor } from '../src/validation';
import { normalizeTypeDescriptors, actionWith } from '../src/util';

test('CALL_API is aliased to RSAA', t => {
t.equal(RSAA, CALL_API);
t.end();
});

test('isRSAA must identify RSAAs', t => {
const action1 = '';
t.notOk(isRSAA(action1), 'RSAAs must be plain JavaScript objects');
Expand Down

0 comments on commit e9c9527

Please sign in to comment.