Skip to content

npm: bump prettier from 3.5.3 to 3.8.1#1646

Merged
nebasuke merged 6 commits intomainfrom
bas/bump-prettier-3.8.1
Apr 14, 2026
Merged

npm: bump prettier from 3.5.3 to 3.8.1#1646
nebasuke merged 6 commits intomainfrom
bas/bump-prettier-3.8.1

Conversation

@nebasuke
Copy link
Copy Markdown
Member

@nebasuke nebasuke commented Apr 8, 2026

Summary

  • Bump prettier from 3.5.3 to 3.8.1
  • Set printWidth: 9999 for generated YAML snapshots so prettier doesn't reformat long mapping keys to explicit ? : syntax (introduced in prettier 3.8)
  • Exclude CHANGELOG.md files from prettier so we don't end up reformatting changeset generated files as 3.8 removes blank lines before indented sub-lists

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: 3719900

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 8, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​node@​24.12.1 ⏵ 24.12.2100 +110081 +196 +2100
Updatednpm/​prettier@​3.5.3 ⏵ 3.8.190 +110097 +195100

View full report

@nebasuke
Copy link
Copy Markdown
Member Author

nebasuke commented Apr 9, 2026

Will block this on #1594 to make sure I don't break it.

@nebasuke nebasuke force-pushed the bas/bump-prettier-3.8.1 branch 2 times, most recently from cdd8232 to c96e1fc Compare April 11, 2026 12:02
Reformat markdown and YAML snapshot files to match prettier 3.8 style.
The CST snapshot YAML files were written via `write_file_raw` which
skips formatting. With prettier 3.8, long YAML lines (>120 chars) get
reformatted using explicit mapping syntax, causing CI test failures
when `verify_contents` string-compares the renderer output against the
prettier-formatted committed files.

Add "yml" to the prettier formatter match arm and switch the snapshot
runner to `write_file_formatted` so generated YAML always matches
prettier's output.
Apply the same fix as V1: switch the V2 CST snapshot runner from
write_file_raw to write_file_formatted so generated YAML goes through
prettier before being written or verified.
@nebasuke nebasuke force-pushed the bas/bump-prettier-3.8.1 branch from c96e1fc to cd4b4d9 Compare April 14, 2026 10:36
Prettier 3.8 reformats long YAML mapping keys to explicit `? :`
syntax, which required switching snapshot writers to
`write_file_formatted`. This spawns a separate prettier process
per snapshot file (~1,294 total), adding minutes to the test phase.

Instead, set printWidth: 9999 for snapshot YAML in .prettierrc so
prettier is a no-op, and revert both V1 and V2 runners back to
`write_file_raw`.
No .yml files go through write_file_formatted anymore, so the
match arm added for the prettier 3.8 fix is now dead code. Revert
to the original set of prettier-formatted extensions.
Prettier 3.8 removes blank lines between list item descriptions
and indented sub-lists in markdown. Some renderers depend on these
blank lines, and changelogs are auto-generated by changesets anyway.

Restore the original formatting from main for affected files.
@nebasuke nebasuke force-pushed the bas/bump-prettier-3.8.1 branch from 52b5a57 to 3719900 Compare April 14, 2026 11:51
@nebasuke nebasuke marked this pull request as ready for review April 14, 2026 12:03
@nebasuke nebasuke requested review from a team as code owners April 14, 2026 12:03
@nebasuke nebasuke added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit 74f6fb3 Apr 14, 2026
15 checks passed
@nebasuke nebasuke deleted the bas/bump-prettier-3.8.1 branch April 14, 2026 15:15
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.

2 participants