Skip to content

R.E.S.P.E.C.T. (v2.0.0)

Choose a tag to compare

@sverweij sverweij released this 24 Feb 20:13
  • feature(*): heed the npm config save-exact and save-prefix (#3)
    this is a BREAKING CHANGE - see below for the impact (likely small b.t.w.)
  • build(npm): ⬆️ all development dependencies to latest
  • ci(*): various tweaks to ease maintenance and satisfy changes to the ci provider's setup

Breaking change: respectsave-exact and save-prefix

Impact: none if you have save-exact set to true. low in all other cases.

With version 2.0.0 up'em will check in your npm config how to write updated dependencies
to your package.json. If there's a save-exact with value true in the config, it will pin dependencies.
In all other cases it will use the value in save-prefix to prefix the updated version with.

Keep pinning versions

If you want to keep pinning versions, make sure your .npmrc contains a save-exact key that equals true. This can be an .npmrc anywhere between your working directory and the root folder of your machine, but I consider it good practice to place the .npmrc in the root of your repository and commit it.

As a bonus npm install new-package and npm install --development other-package will be saved with fixed version numbers as well

save-exact = true

Start using caret or tilde updates

Similarly, if you want to use carets or tildes used for updated (/ newly installed) dependencies, I recommend to commit an .npmrc to your repo with that information in it:

save-exact = false
save-prefix = '^'