Skip to content

Releases: yahoo/fetchr

No need to manually swap server/client fetchr file.

03 Sep 21:29
Compare
Choose a tag to compare

We use libs/fetcher.js on the server and libs/fetcher.client.js on the client. Which meant that when require('fetchr') was called we had to grab different files based on the environment(server or client).

This is no longer necessary due to the browser key in package.json where we can explicitly substitute the client file for the server file, and allow users to not worry about this minor detail anymore.

Bugfix for passing in req to data fetchers

28 Aug 17:57
Compare
Choose a tag to compare
  • Fixed a bug where the req object wasn't being passed into data fetchers for GET requests (#11)
  • Config parameter for CRUD calls is now optional (#10)

New Module Export Format

27 Aug 23:19
Compare
Choose a tag to compare

Fetchr now exports a function that returns the Fetchr class. This allows the Fetcher class to be instantiated per each request so that the request object can be passed into the CRUD methods on registered data fetchers (aka API callers).

Fetcher was implemented as a singleton before this breaking change.

var fetchr = require('fetchr')

now becomes

var Fetchr = require('fetchr')();
var fetchr = new Fetchr();