Modernizing Code for FilerJS
After filing an issue on GitHub to record my intentions to update the source code, I began implementing my proposed changes.
The first task was to implement ‘strict mode’ at the top of the file, ensuring that undefined variables cannot be called.
Next, I changed variables declared using var to const and let where appropriate. This ensures that variables are not declared on a global scope which results in a higher level of data protection. Variables declared using let are bound to the scope of the method or loop they are in. This means that if the variable is declared again outside its original scope it will be treated as a new variable and not be related to the previous declaration in any way.
Once my fixes were complete, I created a pull request in order to have my code reviewed and eventually published to the application repository.
Overall, working on this small issue taught me how to use GitHub to post issues, submit pull requests, and commit my updated files. This will undoubtedly be a key skill moving forward in the world of open-source development.
Reviewing Issues Posted By Other Collaborators
In order to complete my contribution to FilerJs, I reviewed a recently posted issue to ensure the changes were correct and up to standards.
The pull request I reviewed correctly implemented all necessary changes and replaced all var declarations with const and let where appropriate. Strict mode was added to code and there were no errors or bugs upon review.
A key aspect of working on open-source software is communicating with fellow collaborators and facilitating open discussions regarding your code. While working on this release, I engaged in discussions regarding GitHub and how to properly use it when working on an open-source project. Since many of my colleagues were unfamiliar with the inner workings of GitHub, it was a good learning experience that will continue to benefit us throughout our careers in software development.