carbon icon indicating copy to clipboard operation
carbon copied to clipboard

fix(deps): update to prettier 3.2.5, stylelint-prettier 5.0.2

Open 2nikhiltom opened this issue 1 year ago • 6 comments

Closes https://github.com/carbon-design-system/carbon/issues/16604 https://github.com/carbon-design-system/carbon/pull/17406

A continuation of https://github.com/carbon-design-system/carbon/pull/17770, this updates prettier and stylelint-prettier.

The files changed are so large because this also includes all the related reformatting of the codebase based on the updated deps.

Changelog

Changed

  • update prettier to v3
  • update stylelint-prettier to v5
  • re-add prettier v2 under an alias to avoid ESM issues with jest

~🛑 This is a branch off https://github.com/carbon-design-system/carbon/pull/17770, this shouldn't be merged until that one is merged first.~ Merged! 👍

2nikhiltom avatar Oct 18 '24 14:10 2nikhiltom

Deploy Preview for v11-carbon-web-components ready!

Name Link
Latest commit 5e3f6752999e103393af853b7aa2341bb3054a54
Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67192e614dd9f10008c5f004
Deploy Preview https://deploy-preview-17799--v11-carbon-web-components.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 18 '24 14:10 netlify[bot]

Deploy Preview for carbon-elements ready!

Name Link
Latest commit 5e3f6752999e103393af853b7aa2341bb3054a54
Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67192e61ec90a2000877e357
Deploy Preview https://deploy-preview-17799--carbon-elements.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 18 '24 14:10 netlify[bot]

Deploy Preview for v11-carbon-react ready!

Name Link
Latest commit 5e3f6752999e103393af853b7aa2341bb3054a54
Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67192e613bce8800083f29f2
Deploy Preview https://deploy-preview-17799--v11-carbon-react.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 18 '24 14:10 netlify[bot]

I just pushed three commits here. The first updates our internal usages of prettier to use an prettier2 alias of prettier@v2. Reason being that prettier 3's commonjs uses an import statement which causes jest to fail because it doesn't yet support esmodules out of the box. This allows us to safely have both installed - prettier2 is used for the above, and prettier 3 will be used for everything else (yarn format, etc.)

We can remove this alias when one of a few things happens:

  • prettier updates to no longer use an import in the cjs export (unlikely they will do this)
  • jest 30 is released that supports esm out of the box

The second and third commit is the output of running yarn format. The third one was a few stragglers that weren't caught until I temporarily removed --cache from the yarn format script

tay1orjones avatar Oct 18 '24 16:10 tay1orjones

Codecov Report

Attention: Patch coverage is 69.87952% with 25 lines in your changes missing coverage. Please review.

Project coverage is 80.14%. Comparing base (c6ebc2d) to head (5e3f675).

Files with missing lines Patch % Lines
packages/react/src/components/UIShell/Switcher.tsx 47.22% 19 Missing :warning:
...ct/src/components/InlineCheckbox/InlineCheckbox.js 91.66% 2 Missing :warning:
...ackages/icon-build-helpers/src/builders/vanilla.js 0.00% 1 Missing :warning:
...ges/icon-build-helpers/src/builders/vue/builder.js 0.00% 1 Missing :warning:
...ackages/react/src/components/ComboBox/ComboBox.tsx 50.00% 1 Missing :warning:
packages/react/src/components/Stack/Stack.tsx 90.90% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17799   +/-   ##
=======================================
  Coverage   80.14%   80.14%           
=======================================
  Files         406      406           
  Lines       14030    14030           
  Branches     4343     4395   +52     
=======================================
  Hits        11245    11245           
+ Misses       2619     2618    -1     
- Partials      166      167    +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 18 '24 19:10 codecov[bot]

I think we should ignore coverage reports on this one. It's seeing tons of files as "changed" and therefore needing more tests, but they've just been reformatted. We'll hit those components through https://github.com/carbon-design-system/carbon/issues/16319

tay1orjones avatar Oct 18 '24 19:10 tay1orjones

The content of this pull request will be made available as part of our next release. For the full schedule of upcoming releases, check out our Release Radar page.

github-actions[bot] avatar Oct 23 '24 17:10 github-actions[bot]

Hey there! v11.69.0 was just released that references this issue/PR.

carbon-automation[bot] avatar Oct 24 '24 16:10 carbon-automation[bot]