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.

~ dependencies are changed to ^ dependencies on new versions #19211

@JohanvdWest

Description

@JohanvdWest

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 running npm update and the package.json has a ~ dependency which has a new version, the package.json file will be updated to ^latest-~ version.

How can the CLI team reproduce the problem?

Install angular@1.5.10.
Change the package.json to have a dependency of angular@~1.5.0.
Run npm update
1.5.11 will be installed as expected, but package.json will be changed to angular@^1.5.11.

supporting information:

  • npm -v prints: 5.5.1
  • node -v prints: v6.10.3
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Linux
  • Network issues:
    • Geographic location where npm was run:
    • 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions