Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-20127

NPM tagLatestByPublish System Property does nothing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.18.0, 7.3.0
    • Component/s: NPM
    • Labels:
      None

      Description

      As of Artifactory 6.12, the system property mentioned in the Artifactory Documentation has no effect.

      Steps to reproduce:

      1. Have a test NPM project that deploys to Artifactory
      2. Deploy an initial "latest" release, version 1.0
        The metadata correctly reflects that this is the latest release
      3. Deploy a snapshot 0.1-SNAPSHOT version
        The metadata incorrectly updates to say this is the latest release
      4. Attempt to toggle the artifactory.npm.tag.tagLatestByPublish System Property

      The property has no effect, Artifactory always updates to the most recently uploaded file unless manually changed

       

      The only workaround is to use an NPM command to manually set the latest version:

      npm dist-tag add <Pkg>@<Version> latest

       

      This is still a problem, as a documented System Property has no effect. We originally had an option in Artifactory to allow for the "latest" tag to be specified automatically, but the option no longer appears to work.

      This causes builds that perviously worked to now fail unless they manually run an NPM command, adding overhead.

       

      npm publish
      npm notice
      npm notice  test-package@0.1.2
      [...]
      npm notice
      + test-package@0.1.2

      /artifactory/api/npm/npm-local/test-package:

       "dist-tags" : { "latest" : "0.1.2" }

       

      Then publish a "Snapshot" of an earlier version:

      npm publish
      npm notice
      npm notice  test-package@0.0.33-SNAPSHOT11
      [...]
      npm notice
      + test-package@0.0.33-SNAPSHOT11

      /artifactory/api/npm/npm-local/test-package:

      "dist-tags" : { "latest" : "0.0.33-SNAPSHOT11" },

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tamirh Tamir Hadad
              Reporter:
              patrickr Patrick Russell
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: