Open matthelliwell2 opened 2 years ago
Have you tried adding save-exact=true
to .npmrc
?
Yes, I've just tried it and I still get the ^ added when running salita --update, eg
Changed: @types/node from 16.11.17 to ^17.0.5
Ahh right, hmm. We look at the save-prefix (which you could set to =, as a workaround) but not save-exact.
An alternative would be for salita to preserve whatever is there to begin with.
Dependencies in my package.json are pegged, eg "@types/node": "16.11.17". When we decide to run Salita and update the dependencies, the version is updated correctly but they stopped being pegged.
eg "@types/node": "16.11.17" -> "@types/node": "^17.0.5"
We then either have to do a manual search and replace or our Renovate Bot changes them to be pegged and creates a merge request. Either way, it's a bit of extra work that I would like to avoid.
Ideally I would like Salita to recognise that the dependency is pegged and when it updates it, it remains pegged,
eg "@types/node": "16.11.17" -> "@types/node": "17.0.5"
Alternatively there could be a command line option for it.