-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
(the use of @roundforest
is just an example.)
Using npm init @scope
will use the latest version of the package, but only if the latest version is semver-minor/patch compatible with the version last used in nm init @scope
. If it is semver-major changed, then it will continue to use the older version.
Expected Behavior
Always use the latest version of the init package, even if the semver-major version of the package is larger.
Steps To Reproduce
- Run
npm init @roundforest
to run the@roundforest/create
, which is currently at version1.0.0
. Works! - Publish a new version of
@roundforest/create
, version1.1.0
. - Run
npm init @roundforest
to run the@roundforest/create
. It will ask to usev1.1.0
, and uses it. Yay! - Now publish a new version of
@roundforest/create
, version2.0.0
(semver incompatible with1.1.0
. - Run
npm init @roundforest
to run the@roundforest/create
. It will NOT use version2.0.0
, even though I expect it to. - If I delete the
npx
cache ofnpm init
, and trynpm init @roundforest
again, it will use version2.0.0
Environment
- OS: macOS Big Sur
- Node: 16.3.0.
- npm: 7.15.1
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release