You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since @ljharb has already proposed an RRFC of obey user specifier, which will be implemented at the next major version of npm@9.
In my cases, when installing a new dependency using npm install antd@conch, I want my antd to keep the exact conch dist-tag in my package.json, because this is exactly the version I need in my project. By saying version, I mean the version conch points to, not the moment I run the install command.
I think that another flag would be my preference. I think --force in this case is ambiguous and since it is a common flag might already have some associated behavior (although I cannot think of one off the top of my head).
Something like --no-resolve-dist-tag? IDK, that seems weird to, but just thinking something which is more explicit to the expected behavior for this feature would be good.
EDIT: Sorry I just noticed you opened a PR, and I think I also see that you did update the flag. Should we close this issue in favor of the RFC itself?
I think that another flag would be my preference. I think --force in this case is ambiguous and since it is a common flag might already have some associated behavior (although I cannot think of one off the top of my head).
Something like --no-resolve-dist-tag? IDK, that seems weird to, but just thinking something which is more explicit to the expected behavior for this feature would be good.
EDIT: Sorry I just noticed you opened a PR, and I think I also see that you did update the flag. Should we close this issue in favor of the RFC itself?
Motivation ("The Why")
Since @ljharb has already proposed an RRFC of obey user specifier, which will be implemented at the next major version of npm@9.
In my cases, when installing a new dependency using
npm install antd@conch
, I want myantd
to keep the exactconch
dist-tag in my package.json, because this is exactly the version I need in my project. By saying version, I mean the versionconch
points to, not the moment I run the install command.And in the obey user specifier RRFC, @wesleytodd suggested a new flag to support that behavior is more reasonable.
Example
Assuming the dist-tag
conch
ofantd
currently binding to the exact version4.20.7
.How
Current Behaviour
npm install antd@conch
should save the semantic versioning into package.json, hence^4.20.7
shall be saved;npm install antd@conch --save-exact
should save the exact version into package.json, hence4.20.7
shall be saved.Desired Behaviour
npm install antd@conch --force
should save the dist-tag into package.json, henceconch
shall be saved;References
The text was updated successfully, but these errors were encountered: