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

NPM rewrite external dependencies does not support all semver expressions


    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0, 6.17.0
    • Component/s: None
    • Sprint:
      Pam - Quality 7


      When using NPM we can put in the package.json file various Git URLs and GitHub URLs as external dependencies. In Artifactory, under "External Dependency Rewrite" in NPM virtual repository we have an option to rewrite all the external dependencies from the package.json file. We fully support all the external dependencies from the NPM documentation except for the dependency in the following format git+ssh://git@github.com:npm/npm#semver:^5.0 - we don't handle all the semver expressions that are valid for NPM. For example, the dependency git+ssh://git@github.com:npm/npm#semver:4.x.0 is valid for NPM but not valid for Artifactory. We would like to support all semver expressions that are supported by NPM (we already support most of them).

      see links attached: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies

      To Reproduce:

      • create NPM local repository and upload an NPM package with an external dependency in the format mentioned above.
      • create NPM virtual repository and in the Advanced tab under "External Dependency Rewrite" set the Enable Dependency Rewrite check box to true. (you also need to create NPM remote repository) and of course point it to your local and remote NPM repositories.
      • curl -XGET -uadmin:password http://localhost:8081/artifactory/api/npm/npm-virtual-repo/package-name - this command returns the package.json with your exteranl dependencies rewritten.


          Issue Links



              • Assignee:
                rotemk Rotem Kfir
                inbart Inbar Tal
                Assigned QA:
                Bar Haim
              • Votes:
                4 Vote for this issue
                8 Start watching this issue


                • Created: