Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-22915

possibility to change the npm "latest" tag without publishing a package

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: NPM
    • Labels:
    • Notability:
      4

      Description

      In NEXUS-9862 the possibility to add and remove dist-tags to npm repositories has been added. However, it is not possible to change the latest tag.

      This improvement is to add the possibility to change and/or remove the latest tag so it can point to any version/release, not just the most recently added one.

      Acceptance criteria

      • It's possible to set the latest tag to any release, not just the most recently added one
      • When applying the latest tag to a release, it is automagically removed from the version it was on. (this way there is always a latest tag on a release)
      • Adding a new release will (still) set the latest tag to that release (it can then be moved by applying latest to another release.

      Important Caveat Regarding npm dist-tags command and "latest" tag

      Using the dist-tags command is not the valid way to implement this ask.

      What is the intent of the latest npm tag?

      The latest tag is an alias tag to the last published (by date) version of a package, that was published without any other tag specified

      • semantic version ordering is not considered when using the latest tag alias
      • according to package metadata docs, the full package metadata format, under the dist-tags section , "Every package will have a latest tag defined"

      npm publish

      • always updates the 'latest' tag to version being published, unless --tag <tagname> is specified

      npm install

      • installs the package metadata 'latest' tagged version, if --tag <tagname> is not specified

      npm dist-tag

      • one cannot use the npm dist-tag command to set the 'latest' tag.

      npm deprecate

      • has no effect on updating the 'latest' tag

      npm unpublish

      package-metadata has a full format and abbreviated format: https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#full-metadata-format

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              magikMaker Bjørn Wikkeling
              Last Updated By:
              Hardeep Nagra Hardeep Nagra
              Votes:
              9 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title