npm update doesn't update gitlab semver dependencies


(Dominik Sander) #1

prerequisites:
We have a simple package with a dependency to a gitlab repository.
At the moment we have a simple dependency on the master branch by using:
"package": "git+ssh://gitlab@our-internal-gitlab.com:package.git"

what we want now:
We want to add versions to our packages by creating tags in git. So we created tags named like v1.1.0
And we want to use semver to get those versions, so we used:
"package": "git+ssh://gitlab@our-internal-gitlab.com:package.git#semver:^1.0.0"

what happens now
If we run a clean install without any node_modules present, it works as expected.
But if we run npm update the newest tag isn’t pulled from git.
If we have installed 1.1.0 and there is a 1.2.0 present, the new version isn’t used. It will only update if change the entry in the package.json, or delete the node_modules folder. But all other packages get their updates without those actions.

what we expect
npm update should update gitlab dependencies as well. We can live that the package.json isn’t updated (mentioned here), but the latest matching version should be used after npm update.

environment
npm version: 6.4.1
node version: 10.0.0
GitLab Enterprise Edition 10.8.5-ee


(Dominik Sander) #2

We checked some things after making this posting, and have still the same issues.

We tried changed the format of the repository to git+ssh://gitlab@our-internal-gitlab.com/package.git#semver:^1.0.0
And also used different semver values.
But the package won’t get updated with npm update.

Same issue occur on a Windows 10 machine and on an OSX machine.


(system) #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.