Framework updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-03-04 23:20:19 +00:00
parent a89daf3d43
commit 3ed8517b2a
891 changed files with 11126 additions and 9600 deletions

File diff suppressed because one or more lines are too long

View File

@@ -12,8 +12,7 @@
* @typedef {import('./types').XastParent} XastParent
*/
// @ts-ignore sax will be replaced with something else later
const SAX = require('@trysound/sax');
const SAX = require('sax');
const JSAPI = require('./svgo/jsAPI.js');
const { textElems } = require('../plugins/_collections.js');
@@ -82,6 +81,7 @@ const config = {
lowercase: true,
xmlns: true,
position: true,
unparsedEntities: true,
};
/**
@@ -113,9 +113,6 @@ const parseSvg = (data, from) => {
return wrapped;
};
/**
* @type {(doctype: string) => void}
*/
sax.ondoctype = (doctype) => {
/**
* @type {XastDoctype}
@@ -183,9 +180,6 @@ const parseSvg = (data, from) => {
pushToContent(node);
};
/**
* @type {(data: { name: string, attributes: Record<string, { value: string }>}) => void}
*/
sax.onopentag = (data) => {
/**
* @type {XastElement}
@@ -204,9 +198,6 @@ const parseSvg = (data, from) => {
stack.push(element);
};
/**
* @type {(text: string) => void}
*/
sax.ontext = (text) => {
if (current.type === 'element') {
// prevent trimming of meaningful whitespace inside textual tags
@@ -237,14 +228,12 @@ const parseSvg = (data, from) => {
current = stack[stack.length - 1];
};
/**
* @type {(e: any) => void}
*/
sax.onerror = (e) => {
const reason = e.message.split('\n')[0];
const error = new SvgoParserError(
e.reason,
e.line + 1,
e.column,
reason,
sax.line + 1,
sax.column,
data,
from
);

View File

@@ -1,7 +1,7 @@
{
"packageManager": "yarn@2.4.3",
"name": "svgo",
"version": "2.8.0",
"version": "2.8.2",
"description": "Nodejs-based tool for optimizing SVG vector graphics files",
"license": "MIT",
"keywords": [
@@ -100,12 +100,12 @@
]
},
"dependencies": {
"@trysound/sax": "0.2.0",
"commander": "^7.2.0",
"css-select": "^4.1.3",
"css-tree": "^1.1.3",
"csso": "^4.2.0",
"picocolors": "^1.0.0",
"sax": "^1.5.0",
"stable": "^0.1.8"
},
"devDependencies": {
@@ -115,6 +115,7 @@
"@types/css-tree": "^1.0.6",
"@types/csso": "^4.2.0",
"@types/jest": "^27.0.1",
"@types/sax": "^1.2.7",
"del": "^6.0.0",
"eslint": "^7.32.0",
"jest": "^27.2.5",
@@ -127,5 +128,8 @@
"rollup-plugin-terser": "^7.0.2",
"tar-stream": "^2.2.0",
"typescript": "^4.4.3"
},
"resolutions": {
"sax@^1.5.0": "patch:sax@npm%3A1.5.0#./.yarn/patches/sax-npm-1.5.0-d40bca2226.patch"
}
}
}