Skip to content

npm update is not updating to the latest (tag) version with semver and git urls #1190

@thomasfrobieter

Description

@thomasfrobieter

What / Why

(private) git dependencies with #semver doesnt get updated to the latest version.

When

Trying to update git+ssh NPM packages to the latest version.

Where

Enviroment: Windows 10 WSL Ubuntu with node v13.13 / npm 6.14.4
Packages located in private Gitlab repositorie(s).

How

Current Behavior

NPM Update updates to outdated versions (tags) sometimes one version behind the latest one, sometimes two. Deleting the package-lock.json doesn't solve the problem either.

Maybe the output of 'npm outdated' is also interesting:

Package:                Current:  Wanted:   Latest:     Location:
webksdct-base      8.1.12     git            git           webksdct

Steps to Reproduce

  1. Add git package to package.json dependencies, eg: webksdct-base": "git+ssh://git@gitlab.com/webksde/drupal/webksdct-base.git#semver:^8.1.0
  2. Update the private git repository.. add some new versions/tags following the semver notation
  3. Also update the version of the private git repo in its package.json (we do this automaticaly by gitlab CI/CD) - lets say the latest version is 8.1.13
  4. Run npm update - the updater prints out: + webksdct-base@8.1.12

Expected Behavior

Update to the latest available version/tag (in this example 8.1.13).

References

Related to npm/npm#19825

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions