angular-update-guide icon indicating copy to clipboard operation
angular-update-guide copied to clipboard

[Enhancement] Minor package version should be clearly defined in the suggested `ng update` command

Open AlexanderFSP opened this issue 4 years ago • 3 comments

Hi, @StephenFluin ! Many thanks for this cool stuff 👏

I have one suggestion about the recommended package versions, which are defined in the ng update command. According to my attachment, if a user wants to migrate, for example, to 8.0.[latest patch version] - he or she should execute ng update @angular/cli@^8.0 @angular/core@^8.0 to install correct dependencies. But according to your guide - the latest patch version of 8th major will be installed (8.2.14 in this case) because we don't supply a minor version for these packages. I think it'll be simpler for users. Thanks!

migration-guide-enhancement

AlexanderFSP avatar Mar 20 '20 11:03 AlexanderFSP

It's actually always recommended to move to the latest minor, as we have virtually never had unfixed regressions in minors. It totally makes sense that this doesn't match the drop downs at the top but maybe we should make it so you can only Target a previous minor if moving within a major.

On Fri, Mar 20, 2020, 4:25 AM AlexanderFSP [email protected] wrote:

Hi, @StephenFluin https://github.com/StephenFluin ! Many thanks for this cool stuff 👏

I have one suggestion about the recommended package versions, which are defined in the npm command. According to my attachment, if a user wants to migrate, for example, to 8.0.[latest patch version] - he or she should execute ng update @angular/[email protected] @angular/[email protected] to install correct dependencies. But according to your guide - the latest patch version of 8th major will be installed (8.2.14 in this case) because we don't supply a minor version for these packages. I think it'll be simpler for users. Thanks!

[image: migration-guide-enhancement] https://user-images.githubusercontent.com/30397060/77157010-992f7000-6ab1-11ea-9318-94d9e382d648.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/StephenFluin/angular-update-guide/issues/59, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABIJQCZU6AZRFBSAYTN4WLRINHBJANCNFSM4LQJN55Q .

StephenFluin avatar Apr 11 '20 14:04 StephenFluin

I'd like to have this too. If previous minor versions are not to be used, why they are selectable in dropdown? Sometimes, when updating project its easier to update it bit by bit. In history this has been case with Angular. If you depend on large number of libraries, sometimes those don't support all minor versions. Though I think nowadays they are supporting usually major versions and don't specify minor versions in peer dependencies.

rubiesonthesky avatar Oct 23 '20 22:10 rubiesonthesky

I'm facing a different challenge, how to update from say 17.2.0 to latest version with same major (as of today, it's 17.3.1)

% ng update @angular/[email protected] @angular/[email protected]  
Using package manager: npm
Collecting installed dependencies...
Found 22 dependencies.
Package '@angular/core' is already at '17.3.1'.
Package '@angular/cli' is already at '17.3.1'.

Above command does run, but it does not update the package.json. If do npm install one by one, always worried missing one or the other and causing any unexpected issue.

Any suggestion?

dopsun avatar Mar 21 '24 06:03 dopsun