Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Semver ranges on git installs are not saved as specified #17190

Open
1 of 13 tasks
kruncher opened this issue Jun 14, 2017 · 0 comments
Open
1 of 13 tasks

Semver ranges on git installs are not saved as specified #17190

kruncher opened this issue Jun 14, 2017 · 0 comments

Comments

@kruncher
Copy link

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

When a semver range is specified; it is not being saved into the package.json file and so has to be edited manually.

How can the CLI team reproduce the problem?

If I were to use the following command:

npm install --save rotorz/unity3d-package-utils#semver:^1.0.0

Then the package.json ends up looking like this:

{
  ...
  "dependencies": {
    "@rotorz/unity3d-package-utils": "github:rotorz/unity3d-package-utils#semver:1.0.0"
  }
  ...
}

Given that I specified a semver range; it would be much more expected to see the following instead:

{
  ...
  "dependencies": {
    "@rotorz/unity3d-package-utils": "github:rotorz/unity3d-package-utils#semver:^1.0.0"
  }
  ...
}

Also, what is the command to install the latest tagged version of a git hosted package?

npm install --save rotorz/unity3d-package-utils#semver:latest

supporting information:

  • npm -v prints: 5.0.3
  • node -v prints: v6.2.2
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Windows
  • Network issues:
    • Geographic location where npm was run: UK
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants