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

NPM: Search results on lower case only

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.7.0, 3.14.0
    • Fix Version/s: None
    • Component/s: NPM, Search
    • Labels:

      Description

      Searches using the Search UI and /v1/search and /v1/search/assets REST APIs always performs searches against the lowercased version of the npm metadata values. For example, package scope, and license names (MIT, ISC). The UI and the originally uploaded/downloaded package metadata may contain uppercased letters.

      UI may show a package scope/group value of SONATYPE.

      A search like this will NOT find that package:

      http://localhost:8081/service/rest/v1/search/assets?repository=npm-hosted&name=simple-npm-package&version=1.0.1&npm.scope=SONATYPE

      However a search like this will find it:

      http://localhost:8081/service/rest/v1/search/assets?repository=npm-hosted&name=simple-npm-package&version=1.0.1&npm.scope=sonatype

      Notes

      NPM maintainers recommend that new package names ( and likewise scopes ) should preferably be lowercased to begin with, before they are published.

      See notes here:

      https://docs.npmjs.com/files/package.json
      https://docs.npmjs.com/misc/scope

      Some rules:

      • New packages must not have uppercase letters in the name.

      Expected

      Searches against terms with case differences should be intuitive. Performing searches using exact case matches should find the exact case matched terms in the UI and REST API and any other "search".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jtom Joe Tom
              Last Updated By:
              Rich Seddon
              Team:
              NXRM - Tron
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title