Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
thomasfrobieter opened this issue Apr 22, 2020 · 1 comment

Comments

@thomasfrobieter
Copy link

thomasfrobieter commented Apr 22, 2020

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://[email protected]/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: + [email protected]

Expected Behavior

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

References

Related to npm/npm#19825

@thomasfrobieter
Copy link
Author

Oh for gods sake.. i found the issue. I'm just an idiot. Gitlab CI updates the version in the webksdct-base's package.json AFTER i created the tag.. so its a new commit, so the updater shows one version before (why ever it differs by two versions in meantime.. maybe a problem with gitlab ci.. whatever..).

Sorry. CLOSED.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant