html-next / ember-cli-changelog

Changelog generation for ember-cli projects.
MIT License
26 stars 8 forks source link

Update ember-ajax to version 3.0.0 🚀 #177

Closed greenkeeperio-bot closed 6 years ago

greenkeeperio-bot commented 7 years ago

Hello lovely humans,

ember-ajax just published its new version 3.0.0.

State Update :rocket:
Dependency ember-ajax
New version 3.0.0
Type devDependency

This version is not covered by your current version range.

Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

I recommend you look into these changes and try to get onto the latest version of ember-ajax. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.

Do you have any ideas how I could improve these pull requests? Did I report anything you think isn’t right? Are you unsure about how things are supposed to work?

There is a collection of frequently asked questions and while I’m just a bot, there is a group of people who are happy to teach me new things. Let them know.

Good luck with your project :sparkles:

You rock!

:palm_tree:


GitHub Release

Breaking Changes

Simplifying normalizeErrorResponse

After much discussion, the team around ember-ajax decided that it was probably not a great idea to reformat the error payload to match some arbitrary format that we designed. Instead, we should just use the payload that the server returned.

If you want to maintain the old behavior, you can include the the legacy/normalize-error-response mixin, which has the old version of the method included and will override the new behavior.

// app/services/ajax.js
import AjaxService from 'ember-ajax/services/ajax';
import LegacyNormalizeErrorResponse from 'ember-ajax/mixins/legacy/normalize-error-response';

export default AjaxService.extends(LegacyNormalizeErrorResponse, {
  // Your other configuration here
});

Replacing AjaxError.errors with AjaxError.payload

The errors property on any AjaxError subclass has been deprecated in favor of a payload property for a while now. If you want access to the response from the server, you should now use the payload property, like so:

return this.get('ajax').request('/posts')
  .then((posts) => {
    // Do something with your posts
  })
  .catch((error) => {
    this.displayError(error.payload); // `error.payload` will be whatever the server responded with
  });

No longer modify null or undefined server response (#232)

If your server response is interpreted by jQuery#ajax to be null or undefined, we will resolve that value, instead of turning it into an empty object.


The new version differs by 226 commits .

There are 226 commits in total. See the full diff.


✨ Try the all new Greenkeeper GitHub Integration ✨
With Integrations first-class bot support landed on GitHub and we’ve rewritten Greenkeeper to take full advantage of it. Simpler setup, fewer pull-requests, faster than ever.

Screencast

Try it today. Free for private repositories during beta.