How to update the ember-cli application for ember-data 1.0.0-beta9?

I have an ember-cli application. Ember-cli seems to be using ember-data 1.0.0-beta.8.2a68c63a data by default at the moment. (at least downloaded to the browser using ember serve )

But I want to use the current beta.9 , because the latest changes are on DS.DateTransform .

How to update the version of ember data?

This is confusing because the ember data seems to be set twice! Once with a gazebo (but I have no dependency on my bower.json), and once with npm (but here is the ember-cli-ember data).

The installed version with bower seems to be 1.0.0-beta.10 (why 10? Only 9 is indicated on emberjs.com!), But the ember-cli-ember-data npm modules have loaded ember-data 1.0.0-beta.8.2a68c63a . A recent change in github repo tells me that it is now deprecated and I need to update my .json package, but how and why does ember-cli not do this for me?

Thanks for the help in installing ember-data 1.0.0-beta.10 !

+6
source share
1 answer

To upgrade to the latest version of ember-data , you must run

 npm uninstall ember-cli-ember-data --save-dev npm install ember-data --save-dev 

The reason for the change is that ember-cli-ember-data was just a wrapper package that was used to include ember-data in the ember-cli . ember-data has recently been updated to be able to use the ember-cli add ember-cli without the need for a shell package (therefore ember-cli-ember-data deprecated).

The problem you see with ember-cli-ember-data is that ember-cli changed the way dependencies are loaded in the bar. It is used to combine files from the vendor and bower_components .

The ember-cli-ember-data image worked ...

  • ember-cli-ember-data placed the standard version of ember-data (which was beta.8) in the vendor directory
  • you were able to update the files in the bower_components directory by specifying a newer version in package.json
  • the bower_components directory will be merged into the supplier directory (with an updated version replacing the version from ember-cli-ember-data )
  • ember-cli-ember-data then imported the ember-data files from the vendor directory

Now that the bower_components directory bower_components not merged into the vendor directory, what happens is that ember-cli-ember-data always downloads its version from the vendor directory (which is why you get the beta version).

+11
source

Source: https://habr.com/ru/post/975355/


All Articles