Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pegged dependencies but keep them pegged #26

Open
matthelliwell2 opened this issue Dec 30, 2021 · 3 comments
Open

Update pegged dependencies but keep them pegged #26

matthelliwell2 opened this issue Dec 30, 2021 · 3 comments

Comments

@matthelliwell2
Copy link

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.

@ljharb
Copy link
Collaborator

ljharb commented Dec 30, 2021

Have you tried adding save-exact=true to .npmrc?

@matthelliwell2
Copy link
Author

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

@ljharb
Copy link
Collaborator

ljharb commented Dec 30, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants