build(deps-dev): bump prettier from 3.8.4 to 3.9.1 - #2858
Conversation
There was a problem hiding this comment.
Stale comment
Injected PR Evaluation: Web Compatibility & Security
PR: build(deps-dev): bump prettier from 3.8.4 to 3.9.1
Scope:package.json,package-lock.jsononly (5 lines changed)
Web Compatibility Assessment
No findings.
This PR updates Prettier from
3.8.4to3.9.1in rootdevDependenciesonly. There are no changes toinjected/,messaging/, platform entry points, wrapper utilities, feature code, or any runtime bundle. Prettier is invoked exclusively via CI/local lint scripts (npx prettier . --check/--writeinlintandlint-fix) and does not ship to end-user browsers.None of the web compatibility evaluation categories apply:
- No API surface overrides or shims
- No prototype chain modifications
- No DOM interaction changes
- No timing/lifecycle changes in injected features
- No platform-specific runtime behavior changes
- No third-party script interaction surface changes
Security Assessment
No findings.
Prettier is a build-time formatting tool. It is not bundled into content-scope scripts, not executed in page context, and does not affect:
- Global capture hygiene
- Messaging trust boundaries
- Prototype/scope attack surface
- Data exfiltration vectors
- Remote configuration trust
- Iframe security
The version bump does not introduce new runtime dependencies or alter the shipped JavaScript surface.
Risk Level
Low Risk — devDependency-only version bump with no changes to injected runtime code, messaging, or browser-facing bundles.
Recommendations
- (Info) Verify CI passes —
npm run lint(which includesnpx prettier . --check) should confirm the new Prettier version is compatible with existing formatting rules. No injected-specific testing is required.- (Info) Safe to merge once CI is green. No rollback mechanism via remote config is needed since this does not affect shipped browser code.
Sent by Cursor Automation: Web compat and sec
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/dependabot/npm_and_yarn/main/prettier-3.9.1")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/dependabot/npm_and_yarn/main/prettier-3.9.1
git -C submodules/content-scope-scripts checkout origin/pr-releases/dependabot/npm_and_yarn/main/prettier-3.9.1Pin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "65658cb4b0e26fbb5ea7c420954c78ba0c029b06")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/dependabot/npm_and_yarn/main/prettier-3.9.1
git -C submodules/content-scope-scripts checkout 65658cb4b0e26fbb5ea7c420954c78ba0c029b06 |
There was a problem hiding this comment.
Stale comment
Dependency update risk review:
prettier3.8.4 → 3.9.1Verdict: Approve with required follow-up — merge is safe after formatting fixes land
Confirmed issue: CI lint will fail without companion formatting changes
Validated locally:
npx prettier@3.8.4 . --check→ passes on currentmainnpx prettier@3.9.1 . --check→ fails on 3 files
npm run lintincludesnpx prettier . --check, so merging this PR alone will break CI.Affected files and 3.9.0 changelog drivers:
File Change Changelog area messaging/lib/shared-types.tsAdds parentheses around conditional types in extendsclausesTypeScript formatting improvements (3.9.0) special-pages/pages/new-tab/app/activity/NormalizeDataProvider.jsAdds trailing ;on ternary branchJavaScript comment/semicolon stabilization (3.9.0) special-pages/pages/new-tab/app/components/BackgroundProvider.jsAdds trailing ;on ternary branchJavaScript comment/semicolon stabilization (3.9.0) These are output-only formatting changes — no runtime behavior impact.
Fix PR opened: A companion PR on
cursor/dependency-update-risk-review-407dincludes this bump plusprettier --writeon the three files. Recommend merging that instead of (or immediately after) this Dependabot PR.
Supply chain risk: Low
- Package: official
prettier/prettieron npm- License: MIT
- Version is exact-pinned (
"prettier": "3.9.1") — matches Prettier's own recommendation- Lockfile integrity hash updated in
package-lock.json- No new transitive dependencies introduced by this bump
Dependency necessity: Still required
Prettier is actively used:
npm run lint/npm run lint-fixat repo root.github/workflows/bot-format.ymlauto-formats cursor bot branches- Documented in
CODING_STYLE.md;eslint-config-prettierdisables conflicting ESLint rulesNo better alternative in-repo — this is the standard formatter.
Test coverage: Adequate via lint gate
There are no dedicated Prettier unit tests (expected for a formatter). Coverage comes from:
npx prettier . --checkinnpm run lint(CI).prettierignorelimits scope to JS/TS (most.md,.json,.css,.htmlignored)Note: 3.9.0 includes major Markdown/YAML/Flow/GraphQL parser upgrades, but those file types are largely excluded by
.prettierignore, so impact on this repo is minimal.
Uncertain / low-priority notes
- Newer patches available: 3.9.5 exists with additional bugfixes (e.g. Markdown/HTML edge cases). Not blocking — 3.9.1 is fine; consider a follow-up patch bump.
- Dropped
import ... assertsyntax: Prettier 3.9.0 removed support for deprecated import assertions. Grep found no usage in this repo — no risk.// prettier-ignoreon two JS files: The ignore directives remain, but 3.9.1 still reformats semicolons on the ternary branches. Cosmetic only; the companion fix PR resolves this.
Recommendation
Close or hold this Dependabot PR and merge the companion fix PR that bundles the version bump with formatting updates. Alternatively, run
npx prettier . --writeon this branch before merge.Sent by Cursor Automation: Review dependabot
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.4 to 3.9.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.8.4...3.9.1) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.9.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
c73c5f1 to
221531d
Compare
There was a problem hiding this comment.
Injected PR Evaluation: Web Compatibility & Security
PR: build(deps-dev): bump prettier from 3.8.4 to 3.9.1 (#2858)
Trigger: synchronize — re-assessed at 221531d
Web Compatibility Assessment
No findings.
This PR changes only package.json and package-lock.json, bumping prettier from 3.8.4 to 3.9.1 in devDependencies. No files under injected/, messaging/, special-pages/, or platform entry points are modified. Prettier is invoked only via lint / lint-fix scripts (npx prettier . --check / --write) and does not ship in any browser bundle. There is no impact on API surface fidelity, prototype chains, DOM interaction, timing, platform behavior, or third-party script compatibility.
Security Assessment
No findings.
Prettier is build-time formatting tooling only. It does not run in page context, does not touch captured-globals.js, messaging transports, the message bridge, remote config, or any trust boundary evaluated in the injected security model.
Risk Level
Low Risk — devDependency version bump with no runtime or injected-code changes.
Recommendations
- Info: Merge after CI passes. No injected-specific testing required.
- Info (optional): If
lintfails due to formatting deltas from Prettier 3.9.x, runnpm run lint-fixin a follow-up commit — this would be a developer-workflow change only, not a web-compat or security concern.
Sent by Cursor Automation: Web compat and sec
There was a problem hiding this comment.
Dependency update review: prettier 3.8.4 → 3.9.1
Summary
This is a semver-minor devDependency bump with a small, confirmed CI impact. The version pin and lockfile integrity look correct, and supply-chain risk is low. Do not merge as-is — companion PR #2859 (now updated) includes the required formatting/regeneration follow-ups.
Confirmed issues
1. npm run lint fails after the bump (blocks unit CI)
Verified locally and in CI run 29245727677:
npx prettier@3.8.4 . --checkpasses onmainnpx prettier@3.9.1 . --checkfails on 3 source files:messaging/lib/shared-types.tsspecial-pages/pages/new-tab/app/activity/NormalizeDataProvider.jsspecial-pages/pages/new-tab/app/components/BackgroundProvider.js
Cause (changelog-backed): Prettier 3.9.0 changes TypeScript conditional-type extends parentheses and several JS formatting rules (ternary/semicolon handling, comment placement). This repo uses default semicolons (semi: true implicit) and formats JS/TS via npm run lint.
2. test-clean-tree / snapshots CI fails (generated types drift)
CI run 29245727619 shows special-pages/pages/new-tab/types/new-tab.ts changes after npm run build.
Cause: json-schema-to-typescript@15.0.4 (used by types-generator) depends on workspace prettier to format generated types. Prettier 3.9.0 collapses some union types onto one line, so regenerated output no longer matches committed files.
Fix: Regenerate and commit the updated new-tab.ts (included in the latest commit on #2859).
Changelog impact for this repo (lower risk areas)
Prettier 3.9.0 includes major parser upgrades (Markdown/micromark, YAML v2, Flow oxidized parser, GraphQL.js v17, Angular). Most are low impact here because .prettierignore excludes **/*.md, **/*.json, **/*.html, **/*.css, and generated special-pages/pages/**/types from npx prettier . --check. The repo also has no Flow/GraphQL sources.
Relevant JS/TS changes for this codebase:
- Conditional-type
extendswrapping (hitsmessaging/lib/shared-types.ts) - Ternary/semicolon stabilization (hits the two NTP files, including blocks marked
// prettier-ignore— the ignore still preserves layout but 3.9 adjusts trailing semicolons) - Dropping deprecated
import ... assert { }syntax — not used in this repo
3.9.1 is a patch fixing CLI cache behavior for ignored files (#19483); beneficial but not the source of formatting diffs.
Test coverage
- No dedicated Prettier unit tests (expected for a formatter devDependency).
- Coverage is CI-based:
npm run lintrunsnpx prettier . --check(.github/workflows/tests.yml). - Functional/runtime tests are unaffected — changes are formatting-only.
Is Prettier still needed?
Yes. It is the project's standard formatter (CODING_STYLE.md, npm run lint-fix, bot-format workflow). eslint-config-prettier is already integrated. No better alternative is used elsewhere in the monorepo.
Supply chain risk
| Check | Assessment |
|---|---|
| Package source | Official prettier on registry.npmjs.org |
| Version pinning | Exact pin "prettier": "3.9.1" (matches Prettier's own recommendation) |
| Lockfile integrity | sha512-ppiDo2CSwexck1eyZUwJHg/N3nf1+6IRCv7W/VJ5vaLnVCmB7+3CdRfMwoCHBBX6xTrREDTksZ4OZl5SSf4zXA== |
| Runtime exposure | devDependency only — not shipped to end users |
| Maintainer trust | Established OSS project (Prettier team) |
Low supply-chain concern for this bump.
Uncertain / follow-up (non-blocking)
- Patch level: npm
latestis3.9.5while this PR targets3.9.1. Consider whether Dependabot should pick up3.9.5for additional patch fixes (needs separate validation). - Skipped
3.8.5: Jump goes3.8.4→3.9.1;3.8.5only added Flowreadonlyvariance support — irrelevant here. prettier-ignoresemantics: The two NTP ternaries still pick up a trailing-semicolon change under 3.9 despite// prettier-ignore. Worth a quick maintainer glance, but behavior is unchanged.
Recommended merge path
- Merge #2859 (companion PR with formatting + regenerated types) instead of this Dependabot-only PR, or
- Cherry-pick/apply #2859's commits onto this branch before merge.
I pushed an additional commit to #2859 (012a33741) to fix the missing new-tab.ts regeneration that was still failing snapshots / test-clean-tree.
Sent by Cursor Automation: Review dependabot
| "eslint-plugin-react-hooks": "^7.1.1", | ||
| "minimist": "^1.2.8", | ||
| "prettier": "3.8.4", | ||
| "prettier": "3.9.1", |
There was a problem hiding this comment.
Confirmed CI blocker: bumping only this line causes npx prettier . --check to fail on 3 files and npm run build to drift special-pages/pages/new-tab/types/new-tab.ts (via json-schema-to-typescript → Prettier). See companion PR #2859 for the required follow-up commits.
|
Superseded by #2863. |


Bumps prettier from 3.8.4 to 3.9.1.
Release notes
Sourced from prettier's releases.
Changelog
Sourced from prettier's changelog.
Commits
c47654cRelease 3.9.106159aaFix bug in release script4bc5ab4Update file-entry-cache to 11.1.5 (#19483)b7fd58bRelease@prettier/plugin-oxc@0.2.0and@prettier/plugin-hermes@0.2.03006400Revert changes in release script7bef7dbGit blame ignore 3.9.0bb817b1Bump Prettier dependency to 3.9.005cf896Clean changelog_unreleased79f6cdfDisable finished steps3613b1eAdd blog post for v3.9 (#19414)Note
Low Risk
Dev-only tooling bump with no production code changes; main review surface is possible formatting diffs if CI re-runs Prettier.
Overview
Bumps the devDependency
prettierfrom 3.8.4 to 3.9.1 in the rootpackage.json, with the matching lockfile entry inpackage-lock.json.Formatting behavior for
npm run lint/lint-fix, CI auto-format, and hooks still goes through the same Prettier CLI; only the installed formatter version changes (including upstream fixes such as CLI ignore-cache behavior in 3.9.1 and broader 3.9.x parser/formatting updates). No application or runtime dependency changes.Reviewed by Cursor Bugbot for commit 221531d. Bugbot is set up for automated code reviews on this repo. Configure here.