Add comments to package.json
Progressively upgrading dependencies in the JS world is a little different compared to Ruby.
When updating a Ruby gem inside a gemfile, you might want to leave notes. For example:
gem 'some-gem', '~> 1.2.3' # TODO: Update once we're on Ruby 3.1
The comment is useful since it shares knowledge related to upgrading this dependency.
Javascript, or JSON, works a little differently. No comments are allowed inside the package.json
file. Instead to achieve roughly the same result you can do this:
...
"//": [
"TODO: Upgrade stylelint-config-sass-guidelines once we're on Node 11+",
"TODO: Upgrade mini-css-extract-plugin once we're on 12.13+ and webpack 5+",
"TODO: Upgrade style-loader once we're on 12.13+ and webpack 5+"
],
"dependencies": {
....
}
"//"
will never be used by npm for any purpose, and is reserved for comments.