I have an ember-cli application. It seems like ember-cli uses ember-data 1.0.0-beta.8.2a68c63a
at the moment by default. (at least thats loaded into the browser with ember serve
)
But i wanna use the current beta.9
, because the recent changes on DS.DateTransform
.
How can I update my ember-data version?
Its confusing because ember-data seems to be installed twice! Once with bower (but I have no dependency in my bower.json), and once with npm (but here the ember-cli-ember-data).
The installed version with bower seems to be 1.0.0-beta.10
(why 10? On emberjs.com only 9 is listed!), but the ember-cli-ember-data
npm modules has a ember-data 1.0.0-beta.8.2a68c63a
loaded.
A recent change on the github repo is telling me that is now deprecated, and I should update my package.json, but how, and why is ember-cli not doing that for me?
Thanks for help to install ember-data 1.0.0-beta.10
!
To update to the latest version of ember-data
you should 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 which was being used to include ember-data
into an ember-cli
project. ember-data
was recently updated to be able to be able to be used an ember-cli
addon without needing a wrapper package (which is why ember-cli-ember-data
is being deprecated).
The issue you are seeing with ember-cli-ember-data
is because ember-cli
changed the way that it loaded bower dependencies. It used to merge files from both the vendor
and bower_components
directories.
The way ember-cli-ember-data
worked was...
ember-cli-ember-data
placed a default version of ember-data
(which was beta.8) in the the vendor
directorybower_components
directory by specifying a newer version in your package.json
bower_components
directory would get merged into the vendor directory (with your updated version replacing the version from ember-cli-ember-data
)ember-cli-ember-data
then imported the ember-data
files from the vendor directoryNow that the bower_components
directory is not being merged into the vendor
directory what is happening is that ember-cli-ember-data
always loaded its version from the vendor directory (which is why you are getting beta.8)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With