Skip to content

Instantly share code, notes, and snippets.

@pahdo
Created February 26, 2017 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pahdo/539a525e09116f713b9527b96004292c to your computer and use it in GitHub Desktop.
Save pahdo/539a525e09116f713b9527b96004292c to your computer and use it in GitHub Desktop.

I started with no real JavaScript or Node.js experience. Ben was a fantastic mentor and explained Yargs very clearly to me and I started digesting the codebase. To do this, I watched Ben Coe and Steve Zhu review and merge (yargs/yargs-#787), which resolves issue (yargs/yargs-#627) so that environment variables now take precedence over config files. From this, I went from nearly zero understanding of command line tools to an understanding of the intricacies of precedence in commands. After getting familiar with the code, I fixed issue (yargs/yargs-#794) by creating and merging pull request (yargs/yargs-#799)) with Ben, so now errors thrown in subcommands like coerce are no longer suppressed, but now appropriately bubbled up. We created a test to reproduce this issue. In doing this bugfix, we encountered another bug where YErrors would not being caught appropriately, and applied that fix as well and managed to refactor repreated code to clean up and slightly reduce the number of lines in the project. Then, I pair programmed with Ben and we reviewed/merged pull request (yargs/yargs-#785)), which introduces default commands functionality. We wrote documentation and tests for the new feature. Then, I wrote tests for pull request (yargs/yargs-#804)), which resolves issue (yargs/yargs-#801)). Specifically, I converted 9 tests from expecting errors to expecting console warnings, corresponding to the change in the pull request.

The pull requests have been merged into the 7.x branch in preparation for release.

Our other team members worked on fixing a few other bugs and also building a slack bot to test correct functionality. For the slack bot, I added a the asciiface feature, which prints out a random ascii face when the user types /hi asciiface. This brings great value to society.

I really learned a lot about open source and Node.js through this experience. It was extremely helpful to work with a mentor and I now feel much more comfortable contributing to open source projects in the future.

Thank you to my mentor Ben Coe and teammate Steve Zhu for all the guidance and help they provided!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment