Skip to content

node-version output without v #1317

Description

@y-nk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions