I started a fresh CLI project a few weeks ago which installed the CLI in v0.24.0
& the framework in v1.0.8
.
Since they released some updates this week (CLI v0.26.0
, Framework v1.1.0
, ...) I'm wondering how to properly update the core components.
I have the following aurelia
dependencies within my package.json
:
{
// ...
"dependencies": {
"aurelia-animator-css": "^1.0.0",
"aurelia-api": "^3.1.1",
"aurelia-authentication": "^3.2.0",
"aurelia-bootstrapper": "^1.0.0",
"aurelia-fetch-client": "^1.1.0",
// ...
},
"devDependencies": {
"aurelia-cli": "^0.24.0",
"aurelia-testing": "^1.0.0-beta.2.0.0",
"aurelia-tools": "^0.2.2",
// ...
},
// ...
}
The following of those packages are outdated compared to latest releases on NPM:
0.24.0
, latest 0.26.0
1.0.0
, latest 1.0.1
1.0.0
, latest 2.1.0
1.1.0
, latest 1.1.1
^1.0.0-beta.2.0.0
, latest ^1.0.0-beta.3.0.0
0.2.2
, latest 1.0.0
Since all of those packages use the caret version range, most of them won't update to the latest version automatically when running npm update
.
package.json
when I'd like to bring the framework to the latest state? (Seems obvious)
package.json
but this is not exactly what I'm looking for since I'd like to explicitly allow new versions to be installed to ensure that other devs or the build server won't work with completely different versions... aurelia-framework
package is not mentioned anywhere within my package.json
file and it's not automatically updating by running npm update
. How do I actually update it?When adding a new library, check in published modules whether there are already modules that deliver it. Pay special attention whether they include a different version to the one you want to update, because in this case incompatibility issues could appear when installing that module together with your library.
When upgrading a library (or including a new one), you need to check the newer version's license. If it is the same as the older version, there is no problem. Once the prerequisites are satisfied, the upgrade process consists on the following steps: A new library version can change its public API.
Physical Component - physical component name. Logical Symbol - associated logical symbol. Library - source library from which it was placed. Count - number of instances currently placed across all enabled schematic documents. Next - click to access Page 2 of the dialog.
The Update From Library dialog provides controls to pass changes to parameters, symbols and model references in the external database as well as graphical modifications made in referenced symbol and model libraries. The dialog is accessed by clicking Tools » Update From Libraries.
The documentation for the CLI says to add a NPM script that you can run to update then all to the latest version:
https://github.com/aurelia/framework/blob/master/doc/article/en-US/the-aurelia-cli.md#updating-multiple-libraries.
Which would mean adding something like this to your package.json scripts section:
"au-update": "npm i aurelia-binding@latest aurelia-bootstrapper@latest aurelia-dependency-injection@latest aurelia-event-aggregator@latest aurelia-framework@latest aurelia-history@latest aurelia-history-browser@latest aurelia-loader@latest aurelia-loader-default@latest aurelia-logging@latest aurelia-logging-console@latest aurelia-metadata@latest aurelia-pal@latest aurelia-pal-browser@latest aurelia-path@latest aurelia-polyfills@latest aurelia-route-recognizer@latest aurelia-router@latest aurelia-task-queue@latest aurelia-templating@latest aurelia-templating-binding@latest aurelia-templating-resources@latest aurelia-templating-router@latest aurelia-testing@latest aurelia-dialog@latest -S",
The first time you upgrade it will add references in your package.json to them, so the dependencies section get's a lot bigger/ adds all those missing nested dependencies.
Another way is to use a NPM package that performs these checks for all your packages npm check updates also the non-Aurelia ones.
Which allows you to do:
ncu
to check which packages are outdated, and
ncu -u
to upgrade them all to the latest version ignoring the semver restrictions.
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