dependabot / dependabot/dependabot-core

Dependabot to handle .nvmrc

Open
#4,808 4 comments 24 reactions 0 assignees View on GitHub
L: javascript:npm T: feature-request
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 18h
Merged PRs (30d)
149

Description

This is actually a duplicate of https://github.com/dependabot/dependabot-core/issues/1462, but it was closed off and I'd like to suggest we re-open the discussion.

One really nice feature of Dependabot is its ability to use pyenv to install correct versions of Python/pip in order to bump repos in a sensible way. We have recently started moving to Node 16 and it came to my attention that Dependabot does not have a similar mechanism for Node.

I found this quite surprising, as nvm as a tool for this is well established and simple to install and use. Since the npm version in Node 16 is npm 8, and this brings with it a change in lockfile format, and we are running Dependabot with Node 12/npm 6, each PR right now is rewriting the lockfile format to the old way. While I believe this not to be breaking at the moment, it is a source of toil for our users.

I could upgrade to Node 16, but then I will have the opposite problem of users still on Node 12 having their lockfiles rewritten.

Instead, it would be great if dependabot could, e.g., understand a .nvmrc file and run the commands it needs to run with the version specified there, installing it if needed, just like in Python. Is this something that is being considered on your roadmap?

Contributor guide

Open the contributing guide

Research direction

Start with the duplicate discussion at dependabot-core#1462 and the .nvmrc behavior described here; compare it with the existing pyenv-based Python handling. Done means Dependabot can install and use the Node version specified by .nvmrc without rewriting lockfiles for users on another Node/npm version.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.