Skip to content

[Docs Site] Bump svgo from 4.0.1 to 4.0.2#32299

Open
dependabot[bot] wants to merge 1 commit into
productionfrom
dependabot/npm_and_yarn/svgo-4.0.2
Open

[Docs Site] Bump svgo from 4.0.1 to 4.0.2#32299
dependabot[bot] wants to merge 1 commit into
productionfrom
dependabot/npm_and_yarn/svgo-4.0.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 24, 2026

Copy link
Copy Markdown
Contributor

Bumps svgo from 4.0.1 to 4.0.2.

Release notes

Sourced from svgo's releases.

v4.0.2

What's Changed

Security

Bug Fixes

Performance

Other Changes

Commits
  • b2309cf chore: sync version with api
  • f529cfc Merge commit from fork
  • 581fe68 performance: speed up mergePath child node removal (#2216)
  • eb4c8b6 docs(removeAttributesBySelector): properly document and check types (#2215)
  • 6fd5872 fix(convertColors): skip convertCase on css custom properties (#2213)
  • 7414f73 fix: properly parse negative (or +) arc radii (#2205)
  • a8c19aa fix: only call encodeSVGDatauri once and add test case (#2053)
  • 65548f4 fix(convertPathData): properly handle consecutive t commands (#2156)
  • a41a7c1 fix(convertPathData): introducing isSafeToRemove (#2164)
  • 38625dd test: handle charm icons (#2203)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [svgo](https://github.com/svg/svgo) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](svg/svgo@v4.0.1...v4.0.2)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 4.0.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested a review from a team as a code owner July 24, 2026 03:06
@dependabot
dependabot Bot requested a review from a team as a code owner July 24, 2026 03:06
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jul 24, 2026
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Dependabot review

Package Impact Recommendation
svgo 4.0.1 → 4.0.2 🟡 Low ✅ Merge

Overall: ✅ Merge + spot-check

svgo 4.0.2 is a patch release that fixes a security issue in the removeScripts plugin (JavaScript URI handling) and several SVG optimization bugs. In this repo svgo is a direct devDependency, but it is only used by the manual utility script scripts/optimize-svgs.ts, which is not part of the Astro build or Worker runtime and only rewrites checked-in source SVGs when explicitly run. There are no API changes and no changes to how the script calls optimize(...), so normal site output is unaffected. The security fix is not exploitable here because the script processes trusted, internally authored SVG files rather than untrusted user content.

Package details

svgo: 4.0.1 → 4.0.2

Type: security fix
Dependency type: direct

What changed

  • removeScripts plugin now strips JavaScript URIs case-insensitively and handles the SVG/XLink namespace correctly (security fix).
  • convertColors no longer normalizes case for CSS custom properties.
  • convertPathData handles consecutive t commands and removal safety better.
  • Negative or explicit + arc radii are parsed correctly.
  • Data URIs are encoded only once.
  • mergePaths child-node removal is faster, and removeAttributesBySelector warns/noops on missing parameters.

Usage in this repo
Direct import in scripts/optimize-svgs.ts: import { optimize } from 'svgo' with a preset-default config that disables cleanupIds, removeTitle, removeViewBox, and removeHiddenElems. The script is run manually via pnpm run script:optimize-svgs. astro-icon also transitively depends on svgo v3.x, which the lockfile refresh updates from 3.3.3 to 3.3.4.

Impact: 🟡 Low — The optimize API is only called in a standalone helper script that is not executed during normal builds or in the Worker; changes affect source SVG optimization only when the script is run explicitly, and the security fix is not relevant because the repo processes trusted SVGs.


@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
package.json @cloudflare/content-engineering
* @cloudflare/product-owners

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants