Skip to content

Upgrade to Prettier 3.10.2 (#2336) - #2336

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D136322615
Dec 5, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D136322615

Conversation

@noschiff

@noschiff noschiff commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary:
X-link: react/react-native#60573

Upgrade the Prettier dev dependency from 3.10.0 to 3.10.2.

3.10.2 adds a semicolon after a // prettier-ignore class field, in front of any comment after it. Two Metro worker fields keep their Flow type in such a comment, so the result (#plugins; /*: ... */) doesn't parse. They now have an initializer (= [], = undefined), which keeps the comment inside the field and changes no behavior: an uninitialized field is already undefined, and the constructor always replaces #plugins.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D136322615

@meta-codesync

meta-codesync Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

@noschiff has exported this pull request. If you are a Meta employee, you can view the originating Diff in D136322615.

@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Metro review: Looks good

Risk: low · Commit: da51ee8 · 7 commands run

This PR upgrades the Prettier devDependency from 3.10.0 to 3.10.2. It also gives two metro-file-map worker private fields an initializer, so their Flow comment types survive 3.10.2's new semicolon placement. My previous finding is fixed: with 3.10.2 installed, yarn format-check passes, Flow reports no errors, and the metro-file-map unit tests pass. Both initializers are behavior-neutral. #plugins is always reassigned in the constructor, and #dependencyExtractor was already undefined when no extractor is configured.

No findings.

Verified
  • ✅ node -p "require('prettier/package.json').version" (head) — 3.10.2 installed in head checkout
  • ✅ yarn prettier --check packages/metro-file-map/src/worker.js packages/metro-file-map/src/plugins/dependencies/worker.js
  • ✅ yarn format-check — All matched files use Prettier code style
  • ✅ yarn flow full-check — Found 0 errors; readonly field with initializer plus constructor assignment accepted
  • ✅ yarn eslint packages/metro-file-map/src/worker.js packages/metro-file-map/src/plugins/dependencies/worker.js
  • ❌ yarn jest --no-watchman packages/metro-file-map (head) — 1054 passed. The 15 failures are all Watchman integration tests (watchers/crawlers integration-test.js), which can't run in the sandbox.
  • ❌ yarn jest --no-watchman packages/metro-file-map (base) — The same 15 Watchman integration failures on the base, so they are environmental.

Not run: No benchmark: the only runtime change is a field initializer in the file-map worker constructors, which costs nothing measurable. The Watchman integration tests can't run in the sandbox, and fail identically on the base. No Windows run, since nothing here depends on the platform.

Automated review by Claude. Advisory only: it never approves or blocks, and a maintainer makes the call.

Summary:
X-link: react/react-native#60573


Upgrade the Prettier dev dependency from 3.10.0 to 3.10.2.

3.10.2 adds a semicolon after a `// prettier-ignore` class field, in front of any comment after it. Two Metro worker fields keep their Flow type in such a comment, so the result (`#plugins; /*: ... */`) doesn't parse. They now have an initializer (`= []`, `= undefined`), which keeps the comment inside the field and changes no behavior: an uninitialized field is already `undefined`, and the constructor always replaces `#plugins`.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D136322615




Signed-off-by: Noah Schiff <noahschiff@meta.com>
@meta-codesync meta-codesync Bot changed the title Upgrade to Prettier 3.10.2 Upgrade to Prettier 3.10.2 (#2336) Dec 5, 2026
noschiff added a commit to noschiff/react-native that referenced this pull request Dec 5, 2026
Summary:

X-link: react/metro#2336

Upgrade the Prettier dev dependency from 3.10.0 to 3.10.2.

3.10.2 adds a semicolon after a `// prettier-ignore` class field, in front of any comment after it. Two Metro worker fields keep their Flow type in such a comment, so the result (`#plugins; /*: ... */`) doesn't parse. They now have an initializer (`= []`, `= undefined`), which keeps the comment inside the field and changes no behavior: an uninitialized field is already `undefined`, and the constructor always replaces `#plugins`.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D136322615




Signed-off-by: Noah Schiff <noahschiff@meta.com>
meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Dec 5, 2026
Summary:

X-link: react/metro#2336

Upgrade the Prettier dev dependency from 3.10.0 to 3.10.2.

3.10.2 adds a semicolon after a `// prettier-ignore` class field, in front of any comment after it. Two Metro worker fields keep their Flow type in such a comment, so the result (`#plugins; /*: ... */`) doesn't parse. They now have an initializer (`= []`, `= undefined`), which keeps the comment inside the field and changes no behavior: an uninitialized field is already `undefined`, and the constructor always replaces `#plugins`.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D136322615

Pull Request resolved: #60573
@meta-codesync
meta-codesync Bot merged commit 742d658 into main Dec 5, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants