[RRFC] an ability for a package to indicate that it should always be installed as if --save-exact were specified
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
Install an exact version of Prettier locally in your project. This makes sure that everyone in the project gets the exact same version of Prettier. Even a patch release of Prettier can result in slightly different formatting, so you wouldn’t want different team members using different versions and formatting each other’s changes back and forth.
-- from Prettier's docs, https://prettier.io/docs/en/install.html#summary
Example
Another example of where this can be really useful is packages whose authors explicitly acknowledge they don't follow semver.
For example, TypeScript. See https://github.com/microsoft/TypeScript/issues/14116
How
Current Behaviour
There is no way to do this.
Desired Behaviour
As a package maintainer, I should be able to specify "exactVersion": true (or "semver": false) in package.json, so that the users automatically get "my-package": "1.2.3" instead of "my-package": "^1.2.3" when they run npm install my-package.
References
- Related: https://github.com/npm/rfcs/pull/40
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the desired behavior in this issue and the related RFC #40, focusing on package.json and the npm install flow described here. Done means a package maintainer can declare exactVersion (or an equivalent setting) and npm install records an exact version instead of a caret range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100