Release 0.3 – Updating Major Dependencies in Mozilla Thimble

For release 0.3 I decided to work on issue 1908 on Mozilla Thimble.

The issue was updating major dependencies that Mozilla Thimble uses. The major dependencies that needed to be updated were:

  • cryptr
  • fs-writefile-promise
  • glob
  • grunt-cli
  • grunt-contrib-csslint
  • grunt-lesslint
  • jquery
  • helmet
  • wolfy87-eventemitter

I solved this issue by creating 9 separate pull requests for each dependency. This was suggested by @Pomax. This made it easy to debug and test each update rather than have one pull request that contained all the updates. I used npm-check to get a list of the major updates that were available for these dependencies. I found using npm-check was a great tool that made it really easy to get the updates and install them. It also updated the package.json file once the updates were installed.

After I updated each dependency separately I needed to test the update to see if everything works correctly. I did these steps for each of the updated dependencies in order to test them:

  • npm install
  • npm test
  • vagrant up
  • opened Thimble in localhost to test if everything is working

The update for grunt-lesslint resulted in having many warnings when running npm test. The warnings were from the rules known-properties and order-alphabetical. I needed to fix these warnings so that when npm test runs all the tests pass.

I fixed these warnings by turning off the known-properties and order-alphabetical rules in the Gruntfile.js file. This resulted in making the tests for lesslint pass since these rules were turned off.

For the grunt-cli update I needed to test it on bramble.mofostaging.net to make sure that nothing broke on staging from the new update. I tested it on staging and everything seemed to work fine.

As of now, most of these updated dependencies got merged in. However, some of them still need to be reviewed.

Here are my 9 pull requests:

In conclusion, I learnt that updating major dependencies resulted in sometimes needing to modify some files in order to meet with the new update. It is not as easy as just updating the dependency and expecting everything to work afterwards. Testings need to be made in order to check that everything is working properly. Also working on this issue made me become better with using Git since I needed to create 9 different branches for this issue.

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s