actions / actions/setup-node

node-version output without `v`

Open
#1,317 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
5k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
2

Description

Description:

I'd like to propose that we change the format of the outputs.node-version to not include v.

Justification:

The rational is that it's very easy to add the v with v${ steps.setup-node.outputs.node-version } but it's impossible to remove it since github does not give expressions to perform operations on strings.

The most mainstream usage i see of this (and i'm probably biased) is to pass the node-version installed in CI in a docker build with something such as ARG NODE_VERSION=22; FROM node:${NODE_VERSION}-alpine where obviously the v doesn't fit. Also semver computation would benefit from this as vX.Y.Z is not a semver compliant format.

Are you willing to submit a PR?

Yes, but I'd prefer directions before:

  • Either it's made breaking and we keep node-version as a single output
  • Either it's made non-breaking by introducing another parameter and adding a warning node to deprecate the 1st one - i have no idea how to name that parameter.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the outputs.node-version output contract and how the setup-node action currently formats it. Review existing output-related tests, then determine whether the change should be breaking or introduce a separate output; done means the selected contract is implemented, documented, and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.