Releases: yahoo/fetchr
Releases · yahoo/fetchr
No need to manually swap server/client fetchr file.
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
New Module Export Format
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();