mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Update minor and patch dependencies (#1528)
* @rollup/plugin-node-resolve ^11.2.0 → ^11.2.1 * @types/jest ^27.0.0 → ^27.0.1 * colorette ^1.2.2 → ^1.3.0 * commander ^7.1.0 → ^7.2.0 * css-tree ^1.1.2 → ^1.1.3 * eslint ^7.22.0 → ^7.32.0 * playwright ^1.9.2 → ^1.14.0 * prettier ^2.2.1 → ^2.3.2 * rollup ^2.42.1 → ^2.56.2 * typescript ^4.2.3 → ^4.3.5
This commit is contained in:
1178
package-lock.json
generated
1178
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@ -93,31 +93,31 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@trysound/sax": "0.1.1",
|
||||
"colorette": "^1.2.2",
|
||||
"commander": "^7.1.0",
|
||||
"colorette": "^1.3.0",
|
||||
"commander": "^7.2.0",
|
||||
"css-select": "^4.1.3",
|
||||
"css-tree": "^1.1.2",
|
||||
"css-tree": "^1.1.3",
|
||||
"csso": "^4.2.0",
|
||||
"stable": "^0.1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^17.1.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^11.2.0",
|
||||
"@types/jest": "^27.0.0",
|
||||
"@rollup/plugin-node-resolve": "^11.2.1",
|
||||
"@types/jest": "^27.0.1",
|
||||
"del": "^6.0.0",
|
||||
"eslint": "^7.22.0",
|
||||
"eslint": "^7.32.0",
|
||||
"jest": "^27.0.6",
|
||||
"mock-stdin": "^1.0.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"pixelmatch": "^5.2.1",
|
||||
"playwright": "^1.9.2",
|
||||
"playwright": "^1.14.0",
|
||||
"pngjs": "^6.0.0",
|
||||
"prettier": "^2.2.1",
|
||||
"rollup": "^2.42.1",
|
||||
"prettier": "^2.3.2",
|
||||
"rollup": "^2.56.2",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"tar-stream": "^2.2.0",
|
||||
"typescript": "^4.2.3"
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
|
@ -87,10 +87,9 @@ const applyTransforms = (elem, pathData, params) => {
|
||||
.trim()
|
||||
.replace(regNumericValues, (num) => removeLeadingZero(num * scale));
|
||||
} else {
|
||||
elem.attributes[
|
||||
'stroke-width'
|
||||
] = strokeWidth.replace(regNumericValues, (num) =>
|
||||
removeLeadingZero(num * scale)
|
||||
elem.attributes['stroke-width'] = strokeWidth.replace(
|
||||
regNumericValues,
|
||||
(num) => removeLeadingZero(num * scale)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var regTransformTypes = /matrix|translate|scale|rotate|skewX|skewY/,
|
||||
regTransformSplit = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,
|
||||
regTransformSplit =
|
||||
/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,
|
||||
regNumericValues = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,8 @@ exports.description =
|
||||
* @author Kir Belevich
|
||||
*/
|
||||
exports.fn = function (root) {
|
||||
const regEnableBackground = /^new\s0\s0\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)$/;
|
||||
const regEnableBackground =
|
||||
/^new\s0\s0\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)$/;
|
||||
let hasFilter = false;
|
||||
const elems = ['svg', 'mask', 'pattern'];
|
||||
|
||||
@ -39,9 +40,8 @@ exports.fn = function (root) {
|
||||
node.attributes.width != null &&
|
||||
node.attributes.height != null
|
||||
) {
|
||||
const match = node.attributes['enable-background'].match(
|
||||
regEnableBackground
|
||||
);
|
||||
const match =
|
||||
node.attributes['enable-background'].match(regEnableBackground);
|
||||
|
||||
if (match) {
|
||||
if (
|
||||
|
@ -7,7 +7,8 @@ exports.type = 'visitor';
|
||||
exports.active = false;
|
||||
exports.description = 'rounds list of values to the fixed precision';
|
||||
|
||||
const regNumericValues = /^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;
|
||||
const regNumericValues =
|
||||
/^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;
|
||||
const regSeparator = /\s+,?\s*|,\s*/;
|
||||
const absoluteLengths = {
|
||||
// relative to px
|
||||
|
@ -8,7 +8,8 @@ exports.active = true;
|
||||
exports.description =
|
||||
'rounds numeric values to the fixed precision, removes default ‘px’ units';
|
||||
|
||||
const regNumericValues = /^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;
|
||||
const regNumericValues =
|
||||
/^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;
|
||||
const absoluteLengths = {
|
||||
// relative to px
|
||||
cm: 96 / 2.54,
|
||||
|
Reference in New Issue
Block a user