Closed rpatterson closed 10 months ago
In case it helps others, I'm working around this with this in ./package.json
:
"overrides": {
"@awmottaz/prettier-plugin-void-html": {
"prettier": ">=2.8.8"
}
}
@rpatterson with respect, npm outdated
showing that there is a difference between what is "latest" and what is "wanted" is not a failure — at least, not with respect to this package. npm
seems to be resolving dependency versions correctly based on the version specifiers in peerDependencies
.
I take great care to test for compatibility with each released version of Prettier, and I only publish explicit compatibility ranges for versions that are tested. This does mean there will be a bit of a lag between releases of Prettier and releases of this package.
I'm happy to review PRs that update the tests and peerDependencies
version compatibility specifier. Otherwise, overrides
is the way to, well, override what is configured by this package.
Also, please note that Prettier's installation instructions specify that you should use --save-exact
.
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.
It's for this reason that I use such strict dependency ranges.
The following version restriction from this package is too restrictive and prevents updating prettier to new patch versions:
With the following in
./package.json
:Nothing is changed when running
$ npm update
but the following fails: