-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When installing via npm install our-library@">4.2.0-beta", npm does not find any version to install. It ignores any pre-release version unless you specify the exact pre-release version. Same with npm outdated, it does show that there is a new pre-release version available in the Latest column, but Wanted column is always current installed pre-release version. I have tried using >4.2.0-beta, ^4.2.0-beta, and ~4.2.0-beta. None will cause the outdated to show the new pre-release as wanted.
Expected Behavior
With the use of >4.2.0-beta, outdated and install should consider pre-release versions. Or add a command line switch to enable looking for pre-release versions.
Steps To Reproduce
Installing
- Build library that has pre-release version
1.0.1-beta-123and publish it to npm repo. - Try to install using
>1.0.0-beta
Updating
- Build library that has pre-release version
1.0.1-beta-123and publish it to npm repo. - Install using
@^1.0.1-beta-123 - Build new pre-release version
1.0.2-beta-456and publish it to npm repo. - Run
npm outdated. Wanted shows1.0.1-beta-123, Latest shows1.0.2-beta-456
Environment
- npm: 10.9.0
- Node.js: v21.7.3
- OS Name: Windows 11
- npm config:
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps