The first beta release of AeroGear.js 2.0 is out and ready for you to test it!
There's been a bunch of changes that could possibly break existing code as well as some things that have been removed.
It was deteremined that Pipeline and pipes did not add much value since it was basically a wrapper on top of jQuery Ajax.
So Pipeline and pipes have been completely removed in 2.0
If this was something that you used, they will still live on in the 1.X branch
Similar to Pipeline, the Auth module didn't really add any value to the library, so this has also been removed.
Again It will live on in the 1.X branch
One of the big things that has changed in Datamanager is that it is no longer dependent on jQuery.
The other thing is that we have fully embraced es6 Promises. Which means we have removed callbacks.
For the IndexedDB and WebSQL adapters, the auto param has now been updated to default to true. This means that you no longer have to excplitly call open.
So instead of doing something like this:
idbStore.open(...).then(function () {
idbStore.read(...)
});
You can now just do
idbStore.read(...)
We also updated the internal Ajax library to just use promises also.
This is used by both the UnifiedPush SDK and the Authz OAuth2 module.
Since ES6 promises only have 1 return value we return an object with this signature:
{
data: dataOrError, - the data or an error
statusText: statusText, - the status of the response
agXHR: request - the xhr request object
};
The cookbook examples have also been updated with the 2.0.0 beta1 version and can be found in this branch
Last but not least the Integration tests have been completly reworked, thanks to lfryc!!!
The PR's for these are https://github.com/aerogear/aerogear-js-integration/pull/12
and
https://github.com/aerogear/aerogear-js/pull/150