-
Notifications
You must be signed in to change notification settings - Fork 31
How to update aurelia framework for a generic aurelia application
This article is a recording of ideas exchanged in our team chat room starting with this post
Nikolaj Ivancic @adriatic Jul 28 12:17
@JeroenVinke is there a reason not to build the branch user-installable-sdk
with just released aurelia?
Jeroen Vinke @JeroenVinke Jul 28 12:18 @adriatic nope, but we should use the beta branch as the beta npm tag points there.
Nikolaj Ivancic @adriatic Jul 28 12:24
Can anyone tell me how is an existing aurelia app upgraded to the specific Aurelia Framework release, when not having Monterey able to do that. Is there a more "intelligent" approach than manual editing of package.json
file and replace the version numbers by peeking into the version numbers specified in the blog based Rob's release announcement?
Jeroen Vinke @JeroenVinke Jul 28 12:25 tbh I haven't searched for a better way
Nikolaj Ivancic @adriatic Jul 28 12:27 In other words, can one trust jspm update to do the right job? Of course not, as jspm will not be able to be selective to a range (like update just the aurelia framework versions). As I am not privy to the current jspm tile functionality - is such "range limited" action possible by using jspm API?
vegar ringdal @vegarringdal Jul 28 12:29 jspm update aurelia-framework works
Jeroen Vinke @JeroenVinke Jul 28 12:29 not sure if I understand
Nikolaj Ivancic @adriatic Jul 28 12:30
I think that Vegar just answered my question by saying jspm update aurelia-framework works, since using this command is a more "intelligent" approach than manual editing of package.json
file and replace the version numbers by peeking into the version numbers specified in the blog based Rob's release announcement.
vegar ringdal @vegarringdal Jul 28 12:31 ahh, but that does not update the package.json...
Nikolaj Ivancic @adriatic Jul 28 12:35 July 28, 2016 12:31 PM well - we have the answer (a very painful and primitive one) as Monterey can capture the version numbers from running jspm update aurelia-framework and update package.json so we end up with the consistent setpackage.jsonandconfig.js`
Jeroen Vinke @JeroenVinke Jul 28 12:36 hmm, not sure if it is npm or jspm but I thought you were able to change [email protected] to aurelia-framework@* and then jspm install
Nikolaj Ivancic @adriatic Jul 28 12:36 Does anyone have a better idea - or should I consult Guy, who is always quire responsive.
Jeroen Vinke @JeroenVinke Jul 28 12:36 may have been npm
Nikolaj Ivancic @adriatic Jul 28 12:39 July 28, 2016 12:36 PM Let me test this idea as I am too lazy to do manual equivalent of that. I will report back here what I find - and it all is good, that should be the solution for Monterey to do "upgrades or "downgrades"
vegar ringdal @vegarringdal Jul 28 12:45 @adriatic jspm install aurelia-framework updates the package .json, so we could loop them all to update to newest ? But that wont follow version ranges, like babel 5 prb would be updated to 6
Jeroen Vinke @JeroenVinke Jul 28 12:46 this is exactly why monterey needs to know all versions of packages 1.0.0 1.0.1 1.0.3 2.0.0 if you're on 1.0.0 and want to stay with the latest of 1.0.0 then we need to know that there is a 1.0.3 just knowing that the latest is 2.0.0 is not enough
Jeroen Vinke @JeroenVinke Jul 28 12:49 this also allows you to go"I am on 1.0.0, 1.0.3 is buggy, I see that there's a 1.0.1 so update to 1.0.1" tbh I hate the entire automatic update of things how many packages are there in an aurelia project? 1000? if one of them automatically updates "because it is in semver range" and it is a faulty update, then you're screwed
Jeroen Vinke @JeroenVinke Jul 28 12:50 i'd much rather lock all versions by default, and update when you are ready
vegar ringdal @vegarringdal Jul 28 12:59 so having version number in the package.json isnt really something that worth having...
Jeroen Vinke @JeroenVinke Jul 28 12:59 appears so not sure what happens if you remove the version numbers from the dependencies, then install the package
vegar ringdal @vegarringdal Jul 28 13:00 if it works then it should have just been"aurelia-framework": "npm:[email protected]", hehe
Jeroen Vinke @JeroenVinke Jul 28 13:01 well in package.json you declare the ranges that you allow for a package ([email protected]) then jspm sticks to that range and grabs only 1.0.5 even if there's a 1.0.6 it puts that in config.js as that's the installed version
vegar ringdal @vegarringdal Jul 28 13:03 k
Jeroen Vinke @JeroenVinke Jul 28 13:03 but i'm not a fan of semver ranges as it depends on developers to correctly use semver, and it assumes that patch updates are not going to hurt you (while the developer may have screwed up the patch update)