Closed auvred closed 1 year ago
@hosseinmd Hi, thanks for supporting prettier v3! How about creating a new release? :)
Looking forward to a release of this.
I also nominate @auvred as an additional maintainer for this important project.
What version you are suggesting to release this change? It seems like a breaking change, so we should move to 1.0.0
In addition, need to be mention in README, compatible versions with prettier v3 and v2
Maybe 1.0.0 / 0.5.0 (major is 0 means this package is not stable yet) ?
I think it is ok to release major version.
I think it is ok to release major version.
Your project but in my experience, it's still not stable. Per https://semver.org/, Until you release 1.0 there is no obligation to bump the major version on breaking changes. Once you do this, any breaking change will require a major version bump.
I would request that you release as 0.5.0 so as to maintain flexibility in designing the options and their defaults.
Once you do this, any breaking change will require a major version bump.
I agree. On the other hand this is a very popular package that is already used in production by a lot of projects
semver.org states:
How do I know when to release 1.0.0? If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backward compatibility, you should probably already be 1.0.0.
Doesn’t this discourage rapid development and fast iteration? Major version zero is all about rapid development. If you’re changing the API every day you should either still be in version 0.y.z or on a separate development branch working on the next major version.
I think both jumping to v1.0.0 or staying in v0.x.x are both valid
Will every change in the formatting output constitute a breaking change in the future?
Will every change in the formatting output constitute a breaking change in the future?
No, some formatting output changes will be necessary to fix bugs.
But changes in intent (such as flipping a default or removing an option) will be breaking changes. And ofc anything that throws an error.
In my opinion, this is a breaking change for someone who doesn't want to move to prettier v3, so if anybody installed this by caret ^0.4.x might get 0.5.0 then break. We should prevent them to get this version, so we should release major version
@hosseinmd IMO this package's major version is 0, which means it may introduce breaking changes in any minor version change. But I don't mind whether you release a major or minor! :)
So, I released v1.0.0. Thank you.
Closes https://github.com/hosseinmd/prettier-plugin-jsdoc/issues/194
This PR includes a lot of changes, I tried to make them as few as possible, so I didn't run
prettier -w
, to prevent formatting that might complicate the PR review.Checklist:
[x] Migrate to ESM Prettier added support for ESM plugins. Also please read this
ts-jest
tojest-light-runner
+ts-node
To run jest test with new prettier version we need to run node with--experimental-vm-modules
(references: jest docs,--experimental-vm-modules
,node:vm
) Based on my observations it's not stable yet. I tried to run it on node 14 in Github Actions. It fails onSegmentation fault
. References:So I decided to switch to
jest-light-runner
(it's used by prettier itself). It runs without V8 VM, so it's faster and more stable for now Also I droppedbabel-jest
and other babel-related dependencies, because they are no longer needed"type": "module"
and"exports"
topackage.json
. Set"engines": {"node": ">=14.13.1 || >=16.0.0"}
esm
as output format inrollup.config.js
This allowed to revert this commit https://github.com/hosseinmd/prettier-plugin-jsdoc/commit/9fa047447d44789a3d9e9c845d19d0128a61fe50 and achieve smaller package size:
If I missed something, please correct me.
P.S.
1) It'd be nice to update all the dependencies, because they're very outdated... I can do this in this or another PR
2) It seems that the
umd
build is incorrect, because when I pastto the webpage, it throws this
TODO after review:
prettier -w