-
-
Notifications
You must be signed in to change notification settings - Fork 1k
chore(deps): switch to prettier-plugin-pkg #3529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #3529 +/- ##
=======================================
Coverage 99.97% 99.97%
=======================================
Files 2880 2880
Lines 220510 220510
Branches 952 951 -1
=======================================
Hits 220457 220457
Misses 53 53 🚀 New features to boost your workflow:
|
I have problems with applying the argumentation chain from your description to the "problem" at hand.
That said, I’m unsure why this plugin is necessary in the first place. Why must the fields be rearranged every time the formatter runs? If maintaining a specific structure in If this PR ties to resolve the "blocking" dependency update PR #3499 (comment) I'd rather vote to remove the plugin entirely. |
The plugin is especially there in the first place so that if a dependency (normal or dev) is instantly correctly ordered without thinking about it. I'm not against grouping them by Potentially we have all our opinions and need to find a way to live with it. But if you have hard broke feelings by a conflict in mind of how sort orders should be or should not be done, then okay, do a PR and remove the plugin completely and I will approve. However, I'm very unhappy about the forced change within a bugfix release of a plugin going against my opinions. But anyway, doing something in Faker is becoming always a fight and start to not have hard feelings about it anymore 🤷 I gave my arguments why I did it, you are not satisfied with it, so be it. |
@xDivisionByZerox sorry... I hope we can solve the problem somehow. But I gave some arguments that I hope you can understand like the visually eye-scanning for the preflight command.
the plugin would still ignore what humans can thinks and organize into this structure and just forcefully sort it by alphabetical order. And I really dont like that. But on the other hand, having all the other things sorted automatically like dependencies and files and keywords etc, is helping us maintainers to not further think about it, but let the plugin do its job. When we want a sorting and/or prefixing change in our scripts, then lets discuss it in a separate thread. I'm fine with that. |
|
But the new/alternative package now has an option for this, plus it has less sub-dependencies, and it archives the same goal as the other plugin in its prior version where the forcement did not happen. I think the issue I have with your comments is that they just and only come up with counter arguments to check if my already given arguments are valid and stand their point. Instead I would like to get some constructive critic. However I do not see any blocker between adding the However removing the old package... this is to me a destructive critic. And maybe this raged my anger. I assume I misread into the tldr conclusion: my arguments for why doing this change:
these are my points, I do not have more removing the old plugin without a replacement is also not a constructive option to me, cause IMO ...
... is not very constructive. We added it so random contributors e.g. do not accidentally put a new devDependency somewhere by hand. sorting the package.json in a given structure reduces marge conflicts. Maybe when I now think more and more about it, one of my main issues was that your comment started with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated in the last team meeting:
I previously had the incorrect assumption that any npm install
command would automatically sort the dependency fields. If that were the case, the necessity of this PR would be nonexistent for me. Since that isn't the case, I don’t have a strong preference for the specific order and wouldn’t block switching to a different sorting plugin.
Shini pointed out several advantages of the new plugin over the old one. While I don’t fully agree with every argument made, I do recognize that any improvement - even a minor one - is better than staying stagnant.
2580812
to
4eb005d
Compare
4eb005d
to
251ca3c
Compare
Together with @JounQin I contributed to an alternative package of
prettier-plugin-packagejson
. It is written in TypeScript and has less sub-dependencies but archiving the same result but with the option (I contributed) to ignore specific keys likescripts
so it does not forcefully sort things you wont have sorted.E.g. contributors or maintainers could be ordered in chronological order.
Beside the less sub-dependencies, I personally prefer to read in the scripts section the scripts grouped by a personal favored order. e.g. the preflight is at the bottom, cause it is then easier to pin-point with the eyes instead of searching it between all the other script.
Also test, test:update-snapshots, coverage, integration-test and cypress are grouped together, cause they all contribute to testing.