Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Releases: ember-cli/ember-ajax

v4.0.1

10 Dec 04:52
Compare
Choose a tag to compare

Identical to 4.0.0; release made to remove deprecation warning when installing the latest version.

A bug, fixed

23 Oct 17:31
Compare
Choose a tag to compare

What happened?

There was a bug fixed in v3.1.1 that resulted in a "breaking change" for many users. This bug was related to the fact that ember-ajax previously always made relative URLs into absolute URLs. I didn't correctly think about the fact that this would break people that depended on this behavior, and released the change within a "patch" release.

#383 and the resulting conversation was the outcome of this error on my (@alexlafroscia's) part.

Going forward

Two releases were made to attempt to address this fact.

  • v3.1.3 was released that reverts the new behavior. If you were banking on your relative URLs being made absolute implicitly, please upgrade to that version.
  • v4.0.0 was released from master, including no new behavior from v3.1.2. This means that, if you've already upgraded to v3.1.1 or later, you can safely move to v4.0.0 without changing any code on your end.

I'm sorry for whatever frustration this issue caused and appreciate the assistance of those that brought the issue to my attention.

v3.1.0

09 Mar 17:59
Compare
Choose a tag to compare

Features

Make it Simple(r)

22 Apr 21:38
Compare
Choose a tag to compare

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.extend(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.

v3.0.0-beta.1

30 Mar 17:53
Compare
Choose a tag to compare
v3.0.0-beta.1 Pre-release
Pre-release
Released v3.0.0-beta.1

v3.0.0-beta.0

27 Mar 02:59
Compare
Choose a tag to compare
v3.0.0-beta.0 Pre-release
Pre-release
Released v3.0.0-beta.0

v2.5.6

20 Feb 23:01
Compare
Choose a tag to compare

Changlog

  • errors: Recognize HTTP status 0 as AbortError (#243) @Turbo87

Note: This release was not cut from master, which contains breaking changes in preparation for v3.0.0

v2.5.5

15 Feb 19:22
Compare
Choose a tag to compare

Changelog

Note: This release was not cut from master, which contains breaking changes in preparation for v3.0.0

v2.5.4

24 Jan 18:35
Compare
Choose a tag to compare

Changelog

  • Ensure that requestData has the correct method and type (#231)

Note: This release was not cut from master, which contains breaking changes in preparation for v3.0.0

v2.5.0

10 Aug 16:56
Compare
Choose a tag to compare

Addon Changes

Housekeeping

Plus a bunch of dependency updates