-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
First off, thanks for a great library and fantastic effort for the community.
This is a suggestion about the versioning scheme used by prettier.
I would argue that using the minor version of semver for changes isn't applicable to prettier. Why? Any changes that leads to different formatting isn't really compatible with the previous version. For instance, if package.json specifies ^1.2.2
(where a caret version is the default when installing with npm), one repo user could still be at 1.2.2
and another repo user could be at 1.4.4
, and they would have different formatting applied the sources leading to an inconsistent style across the project (and following commit wars until the version difference is resolved).
A workaround would be to use a tilde (~) version in package.json to only allow automatic patch upgrades, but since this is not the default behaviour of npm it will probably lead to problems for many people who are not aware of the issue.
My suggestion is to always increment the major version whenever a change that leads to different formatting is applied.