If you are currently working with the Aurelia Javascript framework, then you would know that every so often given the not-so-beta nature of the framework, a new update comes out for one or more of the framework components.
This article is specifically for Jspm users, updating dependencies in Webpack and RequireJS applications uses Npm instead of Jspm.
If you’re not staying up-to-date for each update, it is possible to fall behind. While you might assume that jspm update
would work. Sometimes if you’re updating an older code-base, the newer code can and possibly will break your application using update.
The best possible solution (as documented by Rob Eisenberg himself in a couple of blog posts) is to install each top level dependency using jspm install "dependency name"
โ because it can be a pain in the behind typing out all of those dependencies, here is a shortcut. I am posting this for my own reference, but to also help anyone else as well.
I will do my best to keep this post up-to-date, but as always, check your package.json file and ensure all of your top-level dependencies are listed here as it is possible things are being added, deprecated and removed with each release of the framework.
jspm install aurelia-binding aurelia-bootstrapper aurelia-dependency-injection aurelia-event-aggregator aurelia-framework aurelia-history aurelia-history-browser aurelia-loader aurelia-loader-default aurelia-logging aurelia-metadata aurelia-path aurelia-route-recognizer aurelia-router aurelia-task-queue aurelia-templating aurelia-templating-binding aurelia-templating-resources aurelia-templating-router
Simply paste this into your command line window in your application directory and watch the magic happen. Don’t forget to add in any additional dependencies you might want to update that are not listed above.
Notes:
There might be some dependencies you are using (especially if you’re building off the Skeleton application) that are not included in the above shortcut line. These are:
- aurelia-animation-css
- aurelia-fetch-client
- aurelia-http-client (if you’re still using this instead of Fetch)
Hey ๐
Thanks for this article! It’s partially the reason I built aurelia-update (https://www.npmjs.com/package/aurelia-update). It’s not perfect, but it basically does what you’ve described here, specifically for your installed aurelia bundles.
Just wanted to share the news.