Migrating through old versions

I have inherited an Ember 1.9 app and need to migrate it through past versions up to something current. It is really just some pages in a Rails app, so it merely uses ember.js and ember-data.js

How do I get past versions of these js files? Obviously, trying to migrate from 1.0 to the current version in one step would be extremely foolish and the best practice of migrating in version steps is needed here. But it looks like we have intentionally blocked using Ember in any way other than a full Ember app. Even the guides pages for older versions have links to get tagged builds and the links are now broken.

Could you elaborate on that part?

Definitely migrating in steps is the best way. The framework has certainly changed pretty drastically since 1.9. IIRC 1.11-2.0 was a fairly intense transition (lots of things change) so I’d step through those pretty carefully. The 2.0 series was generally more stable so you can probably take bigger leaps once you get there. Once you hit 3.0 you’ll hit a bunch of test refactoring (if you have lots of tests). Highly recommend using ember-cli-update once you’re able to. Also you’ll want to migrate your bower dependencies to npm. Unfortunately a lot of the docs are hard to dig up. You’ll also want to make sure you’re slowly working through updating the 3rd party packages along with the ember ones, but you can probably do that at larger intervals.

My workflow when updating is to:

  1. work through any deprecations reported at build time, runtime in console, and in ember inspector
  2. fix any failing tests
  3. give the app a smoke test
  4. bump ember versions
  5. repeat

Anyway, hopefully you’ll find that the worst part is at the beginning and it gets smoother as you go. Good luck!

I think I didn’t successfully focus on the need. I cannot find a way to get the ember.js and ember-data.js files for different versions of Ember. The only thing I can find is to download the CLI and generate an app and that appears to generate only the current version.

To be clear: How do I get the Ember files from past versions? Or, for any version for that matter.

Ah I think I see what you’re getting at, but that’s not really how Ember works, at least in anything past 1.11 or so (or whenever the CLI debuted). I started with Ember about when the CLI was introduced so I don’t have any memories of manual app config but some others here may. Anyway, the way it works since the CLI is you have a project in the conventional ember structure, you manage your dependencies with npm/bower (including ember and ember data and all other ember packages, this is where the versioning comes in), and then when you build with the CLI it smashes all of the dependency code together into vendor.js and the app code into app.js and then includes them in the generated index.html. So you’re never referencing the ember and ember data source files directly, you’re compiling them into your app when you build.

If the project you’ve inherited is pre-CLI you’ll want to migrate it to a CLI project and then upgrade from there. But honestly you may want to evaluate just rewriting it in modern Ember at this point. It really depends on how big and complex the app is. If it’s not huge it might actually just be faster to start fresh and copy paste CSS and bits of js here and there like your model attributes, etc.