Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ember-ajax to the latest version 🚀 #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greenkeeper[bot]
Copy link

@greenkeeper greenkeeper bot commented Apr 22, 2017

Version 3.0.0 of ember-ajax just got published.

Dependency ember-ajax
Current Version 2.5.6
Type devDependency

The version 3.0.0 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.


Release Notes Make it Simple(r)

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.

Commits

The new version differs by 49 commits ahead by 49, behind by 7.

  • 2aba19e Released v3.0.0
  • 5c6a45a Upgrade dependencies (#283)
  • acd384f fix(package): update ember-cli-babel to version 6.0.0-beta.10 (#277)
  • c70bc9a Update to use Babel 6 (#266)
  • 528e843 Upgrade ember-resolver to 4.1.0
  • 4181656 Released v3.0.0-beta.1
  • 86ab8d0 Fix issues with the isString helper
  • 723dd66 Tighten ESLint config
  • 78de692 Hide container by default when running tests
  • ac023c1 Slight cleanup of JSON test helper
  • 60cb8de make sure contentType is a string before running a regex match (#250)
  • 4e784a2 Released v3.0.0-beta.0
  • fe03044 Released v2.5.7-beta.0
  • db086b3 Released v2.5.7
  • 1f4ca9d Simplify normalizeErrorResponse (#265)

There are 49 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

greenkeeper bot added a commit that referenced this pull request Mar 9, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 9, 2018

Version 3.1.0 just got published.

Update to this version instead 🚀

Release Notes v3.1.0

Features

Commits

The new version differs by 33 commits.

  • 8fa376b v3.1.0
  • f375fb8 Ignore a bunch of packages in Greenkeeper
  • 3314904 test fix
  • b96d632 fix: Small mistake with undefined function
  • 00c84d6 decision function and status codes as part of the constructor
  • 25f4e55 Expose status codes on error objects
  • c92d9a7 Update Ember and Ember CLI
  • 24f91ec Install prettier config into ESLint
  • 59a60e1 Replace ember-suave with the Ember ESLint config
  • 967c976 Update other dependencies
  • 66c89a9 Update to lastest version of ember-cli
  • 8fd4113 Install ember-cli-update
  • ccd574c Upgrade ember-cli-testdouble
  • 1b4b32e Update yarn.lock
  • e8270f9 chore(package): update eslint to version 4.1.0 (#308)

There are 33 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 11, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Sep 11, 2018

Version 3.1.1 just got published.

Update to this version instead 🚀

Commits

The new version differs by 34 commits.

  • 196b10f v3.1.1
  • 22f63a0 fix: use assign instead of deprecated merge
  • 3bcd571 chore(deps): update
  • 829d82d chore(ci): run tests against Ember 2.12+
  • 46b7ba1 chore: remove reference to ic-ajax
  • 826d4c3 chore: remove reference to Ember 1.13
  • 6694fb1 chore(docs): update README
  • 3a25d71 fix: don't append leading '/' when building url
  • f71854f refactor: convert to TypeScript
  • 23705b9 chore(deps): install and configure TypeScript
  • 31ee07a fix: make FastBoot test more reliable
  • b96b65f test: add FastBoot test
  • 2f58087 fix: correctly import najax for FastBoot
  • ad730f9 chore(ci): update node version
  • d1990ea fix: clean up some deprecation warnings

There are 34 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 9, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Oct 9, 2018

  • The devDependency ember-ajax was updated from 2.5.6 to 3.1.2.

Update to this version instead 🚀

Commits

The new version differs by 5 commits.

  • f5d3245 chore(release): 3.1.2
  • 55cbc7c chore(deps): install standard-version
  • 101c357 fix: is*Error type definitions
  • fe518dc fix: skip instead of returning url when namespace is present in url
  • 975724d fix: bump typescript to get working d.ts

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 23, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Oct 23, 2018

  • The devDependency ember-ajax was updated from 2.5.6 to 3.1.4.

Update to this version instead 🚀

Commits

The new version differs by 3 commits.

  • 430d11c chore(release): 3.1.4
  • ba9a87d test: add test case around relative URL conversion
  • daf8319 Revert "fix: don't append leading '/' when building url"

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 23, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Oct 23, 2018

  • The devDependency ember-ajax was updated from 2.5.6 to 4.0.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Dec 10, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Dec 10, 2018

  • The devDependency ember-ajax was updated from 2.5.6 to 4.0.1.

Update to this version instead 🚀

Commits

The new version differs by 5 commits.

  • bec4d2c chore(release): 4.0.1
  • b063244 chore(deps): bump najax from 1.0.3 to 1.0.4 (#418)
  • cabaf35 chore(deps-dev): bump eslint-plugin-ember from 5.2.0 to 5.4.0 (#410)
  • 82c0931 chore(deps-dev): bump @types/ember from 3.0.24 to 3.0.25 (#407)
  • 48c86d3 chore(deps-dev): bump @types/node from 10.3.3 to 10.12.5 (#411)

See the full diff

greenkeeper bot added a commit that referenced this pull request Jan 7, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 7, 2019

  • The devDependency ember-ajax was updated from 2.5.6 to 4.0.2.

Update to this version instead 🚀

Commits

The new version differs by 2 commits.

  • 208d871 chore(release): 4.0.2
  • 80e6e15 fix(deprecation): the new EmberObject is deprecated

See the full diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants