Skip to content

unused property (tag) #20

Closed
Closed

Description

@bnb

presently, upon outputting all data, it seems that the "tag" property is completely empty. is there any reason to keep it?

Activity

  1. dominykas commented on Feb 12, 2022

    @dominykas
    Member

    Looks like it comes from here:

    nv/index.js

    Lines 166 to 169 in 31c43b9

    function splitVersion (ver) {
    const [, major, minor, patch, tag] = /^v([0-9]*)\.([0-9]*)\.([0-9]*)(?:-([0-9A-Za-z-_]+))?/.exec(ver).map((n, i) => i < 4 ? parseInt(n, 10) : n || '')
    return { major, minor, patch, tag }
    }

    I guess Node.js never used that, so it may not be necessary, but maybe that code needs to be replaced with semver.parse() anyways, given that semver is already a dep, and return the prerelease prop, however I'm not sure what was the original use case for tag here.

  2. wesleytodd commented on Oct 19, 2023

    @wesleytodd
    Member

    The tag (now prerelease) is used in canary builds. There is a test which covers this. See #33 for a fix and moving to use semver

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions