Skip to content

[BUG] Unable to install/downgrade with tilde versioning #636

@ux-engineer

Description

@ux-engineer

What / Why

I have Typescript version ^3.7.4 installed as a devDependency in package.json:

{
  "name": "my-awesome-package",
  "version": "1.0.0",
  "devDependencies": {
    "typescript": "^3.7.4"
  }
}

When

I want to downgrade Typescript locked to the minor version 3.5, but with the newest patch versions applied. So the correct SemVer version tag would be with the tilde character, so ~3.5.0 in this case.

Current Behavior

Using NPM version 6.9.0 and Node 12.5.0.

I have tried running npm i -D typescript@~3.5.0, however after the installation package.json has "typescript": "^3.5.3".

Adding flag --save-exact doesn't work either, that results in "typescript": "3.5.3".

Expected Behavior

Package.json should have been updated with "typescript": "~3.5.3".

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions