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

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

@kruncher

Description

@kruncher

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions