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

Releases: fusionjs/fusion-plugin-rpc

v2.1.2

18 Sep 00:20
d0afd3e

Choose a tag to compare

Changelog

Highlighted Changes

  • Fix treeshaking for plugin exports (#174)

Other Changes

  • Update dependency flow-bin to ^0.79.0 (#169)

v2.1.1

21 Aug 06:24
caf8a6f

Choose a tag to compare

Changelog

Highlighted Changes

  • Fix token type to fix release verification (#162)

Other Changes

  • Standardize dependency heading sizes (#168)
  • Update dependency rollup to ^0.64.0 (#167)
  • Update dependency eslint to v5.3.0 (#166)
  • Update dependency flow-bin to ^0.78.0 (#164)
  • Fix typo in code example (#165)
  • Update dependency eslint-config-fusion to v4 (#163)
  • Update uber/web-base-image Docker tag to v1.0.7 (#159)

v2.1.0

26 Jul 23:32
ebada3a

Choose a tag to compare

Changelog

  • Allow adding headers to browser initiated RPC calls (#160)
  • Update dependency rollup to ^0.62.0 (#158)
  • Update dependency flow-bin to ^0.76.0 (#157)
  • Update dependency eslint-plugin-prettier to v2.6.2 (#156)
  • Update dependency koa-bodyparser to v4.2.1 (#154)

v2.0.0

02 Jul 21:17
384b9f9

Choose a tag to compare

Changelog

Highlighted Changes

  • Implement new way of handling error responses (#152)

Other Changes

  • Update dependency eslint-plugin-prettier to v2.6.1 (#153)
  • Update dependency flow-bin to ^0.75.0 (#150)
  • Update uber/web-base-image Docker tag to v1.0.5 (#147)
  • Fix Flow complaints (#146)

Migration Guide

Update Handlers to use ResponseError

+import {ResponseError} from 'fusion-plugin-rpc';

const handlers = {
  test(args) {
-   throw new Error('test');
+   const e = new ResponseError('test');
+   e.code = 'ERRTEST';
+   e.meta = {custom: 'metadata'};
+   throw e;
  }
}

If you were previously relying on errors propogating up from libraries, you need
to wrap your usage of the library in a try catch and manually throw a
ResponseError. For example:

const handlers = {
  test(args) {
-   await doThing();
-   await doOtherThing();
+   try {
+     await doThing();
+     await doOtherThing();
+   } catch(err) {
+     const e = new ResponseError(err.message);
+     e.code = 'ERRDOTHING';
+     e.meta = {custom: 'metadata'};
+     throw e;
+   }
  }
}

v1.2.2

17 May 18:08

Choose a tag to compare

Changelog

  • Fix tree shaking (#144)
  • Update uber/web-base-image Docker tag to v1.0.4 (#141)

v1.2.1

10 May 21:35
1645d31

Choose a tag to compare

Changelog

  • Improve Flow coverage (#139)
  • Update dependency flow-bin to ^0.72.0 (#138)
  • Update dependency eslint-plugin-flowtype to v2.46.3 (#135)

v1.2.0

09 May 17:58
0b69142

Choose a tag to compare

Changelog

  • Expose entire error object (except .stack) (#136)
  • Update dependency babel-eslint to v8.2.3 (#129)
  • await next in middleware (#134)

v1.1.0

27 Apr 18:05
8f2cf3a

Choose a tag to compare

Changelog

  • Add BodyParserOptionsToken for bodyparser (#132)
  • Add .npmrc (#131)
  • Update dependency nyc to v11.6.0 (#128)
  • Upgrade flow-bin and fusion-core dependencies to ^0.69.0 and ^1.2.1 r… (#127)
  • Update dependency eslint to v4.19.1 (#125)
  • Update dependency prettier to v1.11.1 (#123)
  • Explain RPC (#124)
  • Update dependency rollup to v0.56.3 (#107)
  • Update dependency eslint-plugin-flowtype to v2.46.1 (#110)
  • Update dependency eslint-plugin-react to v7.7.0 (#111)
  • Update dependency babel-eslint to v8.2.2 (#112)
  • Update dependency eslint to v4.18.1 (#115)
  • Update dependency create-universal-package to v3.4.1 (#122)
  • Update docs (#121)

v1.0.3

21 Feb 20:56

Choose a tag to compare

Changelog

  • Fix server side routing (#119)
  • Remove routePrefix code as the provided fetch should handle it (#114)
  • Update dependency flow-bin to v0.66.0 (#108)
  • Update dependency eslint to v4.18.0 (#109)
  • Update dependency eslint-plugin-flowtype to v2.44.0 (#103)
  • Update dependency rollup to v0.56.0 (#105)
  • Add issue template (#106)
  • Replace FusionJS with Fusion.js (#104)

v1.0.3-1

21 Feb 02:08
fa44bee

Choose a tag to compare

v1.0.3-1 Pre-release
Pre-release

Changelog

No pull requests in this release