HacktoberFest: PR#4

I completed my hacktoberfest with my PR in XLayers Application. XLayers is an amazing application built in Angular which helps to preview and convert SketchApp Design files into any framework and library.

More detailed info can be found here.

Issue

XLayers currently were on 8.0.0 version of Angular and they wanted to be on the latest version of Angular i.e V8.3.

https://github.com/xlayers/xlayers/issues/327

Process

The collaborator in the issue suggested using ng update for updating the angular versions. I dug deep into the command and learnt how it worked through Angular documentation. I tried ng update, it provided me with a small list of updatable packages :

ng update output

Then for my curiosity I ran ng update --all --force, it actually updated every dependency in the package.json, which obviously came with a lot of incompatibilities thus resulting in breaking the build. Before fixing those errors, I confirmed the scope of the issue with the collaborator and was told that they majorly wanted to update angular core dependencies.

So I discarded all the fun stuff I created for myself and got back to ng update, as I dug deeper, I came to know that this command actually had a bug. Whenever you use the ng update <package> , it actually updated some of the related dependencies to latest beta versions on its own. This bug had actually created a lot of heat in Angular CLI repo, and they had an issue locked down until they fixed it.

Ng update bug issue in Angular CLI repo

So I followed the comment, and actually updated the package.json for core angular manually.

PR

https://github.com/xlayers/xlayers/pull/332

The ng version before my PR:

The ng version after my PR:

Learning Outcomes

  • How to upgrade Angular application
  • How upgrade can cause incompatibilities and break your app
  • How to navigate through issues and find solutions through comments šŸ¤·šŸ½ā€ā™‚ļø

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at WordPress.com
Get started
%d bloggers like this: