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.
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 myantdto keep the exactconchdist-tag in my package.json, because this is exactly the version I need in my project. By saying version, I mean the versionconchpoints 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
conchofantdcurrently binding to the exact version4.20.7.How
Current Behaviour
npm install antd@conchshould save the semantic versioning into package.json, hence^4.20.7shall be saved;npm install antd@conch --save-exactshould save the exact version into package.json, hence4.20.7shall be saved.Desired Behaviour
npm install antd@conch --forceshould save the dist-tag into package.json, henceconchshall be saved;References