Next, we'll go through the GitHub Flow to make some changes. If you aren't sure how to do this, try the Introduction to GitHub course and then come back to give it another try.
Note: Before doing this with real world code, make sure that the upgraded package works with your code. Good unit tests and CI (continuous integration) will help you update with confidence.
Step 4: Updating dependency versions
Now that you know the recommended version, it's time to edit the package.json file. You'll upgrade the package to a non-vulnerable version.
:keyboard: Activity: Update the package.json file
Within this pull request, go to Files changed.
Click the ellipsis (...) in the right upper corner and click Edit file to edit the package.json file.
Fix the vulnerability by updating to the latest version of the dependency that you took note of earlier.
Update the dependency
Next, we'll go through the GitHub Flow to make some changes. If you aren't sure how to do this, try the Introduction to GitHub course and then come back to give it another try.
Step 4: Updating dependency versions
Now that you know the recommended version, it's time to edit the
package.json
file. You'll upgrade the package to a non-vulnerable version.:keyboard: Activity: Update the
package.json
file...
) in the right upper corner and click Edit file to edit thepackage.json
file.