Is it possible to tie packageManager updates to nvm?
#40421
Replies: 4 comments 6 replies
-
|
If you have both a If you have a minimal example to share we can give a hand :) |
Beta Was this translation helpful? Give feedback.
-
|
Hi there, Please help this Discussion progress by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running Renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Beta Was this translation helpful? Give feedback.
-
|
It might also be possible to use constraints to limit things to specific version(s) |
Beta Was this translation helpful? Give feedback.
-
|
Until this is a feature, I've managed to work out how to achieve this using {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"customDatasources": {
"node-npm-version":{
"defaultRegistryUrlTemplate": "https://nodejs.org/dist/index.json",
"format": "json",
"transformTemplates": ["{ \"releases\": $each(${npm:$^(lts != false ? 0 : 1, >date)[0]}, function($v) { { \"version\": $v.npm, \"releaseTimestamp\": $v.date, \"isStable\": $v.lts != false } }) }"]
}
},
"packageRules": [
{
"matchDatasources": ["npm"],
"matchPackageNames": ["npm"],
"overrideDatasource": "custom.node-npm-version"
}
]
}See benedfit/renovate-nvm-npm#4 for validation of desired updates |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
A Mend.io-hosted app
Which platform you running Renovate on?
GitHub.com
Which version of Renovate are you using?
42.74.5
Please tell us more about your question or problem
I currently have a number of repositories that use
.nvmrcfor managing node versions. In the past I have relied on the default version ofnpmthat is installed via the nvm image. Recently I have a number of project that are using thepackageManagerfield inpackage.jsonand Renovate has started offering upgrades to the version ofnpm. However, this now means that when folks runnvm install|use, they are likely on an older version ofnpmthan the one Renovate is using, resulting in thrashing of thepackage-lock.jsonfile.So I'm interested to know if there is a recommended way to link the two tools? Either by limiting the upgrade of
npmversions to only supported by the images, or forcingnvmto install/use a particular version ofnpm?Thanks in advance for any help
Minimal reproduction
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions