Skip to content
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

Force the use of the latest prettier in general:format-prettier task #2626

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 5, 2024

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Force the use of the same prettier version as in the CI.

What is the current behavior?

The CI may use a more recent version of the prettier tool since it's installed fresh at each run.

What is the new behavior?

The local task now forces the update of the prettier tool if available.

Does this PR introduce a breaking change, and is titled accordingly?

Other information

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.29%. Comparing base (b16ae70) to head (3efc369).

Current head 3efc369 differs from pull request most recent head 97a9b5f

Please upload reports for the commit 97a9b5f to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2626   +/-   ##
=======================================
  Coverage   70.29%   70.29%           
=======================================
  Files         222      222           
  Lines       21308    21308           
=======================================
  Hits        14978    14978           
  Misses       5153     5153           
  Partials     1177     1177           
Flag Coverage Δ
unit 70.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standard approach is to use npm to manage the Prettier dependency:

https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-prettier-formatting-task.md#dependencies

This way you can perform controlled updates of Prettier instead of being immediately subject to breaking changes that are introduced by a new release of the tool.

@cmaglie
Copy link
Member Author

cmaglie commented Jun 5, 2024

The standard approach is to use npm to manage the Prettier dependency:

I see, I've updated the PR accordingly.

Copy link
Contributor

@alessio-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on linux, it correctly picks up the pinned version

@cmaglie cmaglie merged commit 5c5c176 into arduino:master Jun 5, 2024
6 checks passed
@cmaglie cmaglie deleted the prettier_update branch June 5, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants