Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 52,673
    • Issues 52,673
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,546
    • Merge requests 1,546
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #9425
Closed
Open
Issue created Jan 26, 2019 by Joshua Lambert@joshlambert🏝Maintainer

GitLab NPM Registry to support npm distribution tags

Problem to solve

We know from a recent round of user research, that users typically navigate to the Package Registry user interface to accomplish one of three tasks:

  1. To ensure my package was uploaded correctly (22.9%)
  2. To look up which version of a package I should be using in my environment (21.7%)
  3. To verify my CI pipeline built the package as expected

In order to verify that their package was uploaded correctly or to look up which version of a package should be used, users would like to use package meta data to identify the correct version of their package. NPM tags can be used to provide an alias instead of version numbers, making it easier to discover packages. For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.g., stable, beta, dev, canary.

Target audience

  • Sasha, Software Developer, https://design.gitlab.com/research/personas#persona-sasha

  • Devon, DevOps Engineer, https://design.gitlab.com/research/personas#persona-devon

Further details

Proposal

Update the NPM Registry to add support for package tags when npm CLI interacts with the backend.

Adds 3 url endpoints to NpmPackages for tags handling.

Packages::Npm::

List all the tags within a given package:

$ npm dist-tag ls @root/bacon
latest: 1.4.0

Create a new tag:

$ npm dist-tag add @root/bacon@1.3.0 tagme
+tagme: @root/bacon@1.3.0

$ npm dist-tag ls @root/bacon
latest: 1.4.0
tagme: 1.3.0

Use the tag when install the package:

$ npm install @root/bacon@tagme
npm WARN @root/client@1.0.0 No repository field.

+ @root/bacon@1.3.0
updated 1 package in 15.692s

Remove the tag:

$ npm dist-tag rm @root/bacon tagme
-tagme: @root/bacon@1.3.0

$ npm dist-tag ls @root/bacon
latest: 1.4.0

UI

As we've been redesigning the Package Registry, we have included npm tags as part of that design. #12954 (closed) will capture the final design / work. Test-Package-list-view

What does success look like, and how can we measure that?

Tags can be pushed, consumed, and displayed with GitLab.

Links / references

  • https://docs.npmjs.com/cli/dist-tag
Edited Jan 31, 2020 by Tim Rizzi
Assignee
Assign to
Time tracking