NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2345 most downloaded on npm
Create a JSON-friendly object from an SVG string
Last release 1 months ago
23 Aug 2026
Ships unpredictably
gaps range from 9 days to 6.5 years
Nearly every release is documented
notes for 13 of 14 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
14 releases · first in 2016
This minor release makes malformed SVG easier to diagnose and parser failures easier to handle programmatically.
This minor release makes malformed SVG easier to diagnose and parser failures easier to handle programmatically.
Error objects now expose zero-based line and column properties, plus the rendered snippetSVG input is empty explicitlyFor example, long input is truncated both vertically and horizontally while preserving the error location:
Expected > (2:76)
…
<g aria-label="Decorative curve">
…20 C30 40, 50 60, 70 80 S110 120, 130 140" fill="none" stroke"currentColor" />
^
</g>
…
The error metadata can be handled independently of the human-readable message:
try {
parse(source);
} catch (error) {
console.log(error.line, error.column, error.snippet);
}Note: The human-readable text of parser errors has changed. Consumers matching exact error messages should update their expectations.
Install or update with:
npm install svg-parser@2.1.0Thanks to Christopher Pfohl for contributing structured error metadata.
Full changelog: v2.0.5...v2.1.0
One column per quarter.
line, column, and snippet metadata to parser Error objects for programmatic error handling (#30).Updated development dependencies and addressed vulnerable transitive dependencies while preserving Node.js 8 compatibility for consumers
After a long quiet period, maintenance has resumed. This patch release refreshes the project around the stable parser you already know—there are no intentional parser API or behavior changes.
Install or update with:
npm install svg-parser@2.0.5Thanks to everyone who has used, reported issues on, and contributed to svg-parser over the years. The project is maintained again, and contributions are welcome.
Full changelog: v2.0.4...v2.0.5
svg-parser is alive again! After a long quiet period, maintenance has resumed with refreshed tooling and a modern release process.
There are no intentional parser API or behavior changes in this patch release.
Nothing published for this version
- Fix reported error location
Allow underscores in attribute names
- Fix empty/space attributes
- Migrate to HAST
- Remove unused dependency
- Handle doctype and CDATA
- Handle unexpected end of input
Prevent infinite loops on bad final closing tag
- Prevent ""=true attributes
""=true attributesAllow attributes with numbers (e.g. x1)
x1)- First release
Your coding agent can read these notes before it upgrades. Set up the MCP server →