Update all dependencies (#6351)

* Update all dependencies

* Update SVGO configuration

SVGO v2.4.0 deprecated the old approach of extending default
plugins (using `extendDefaultPlugins`) and introduced a new
approach using the 'preset-default' plugin.


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
This commit is contained in:
renovate[bot] 2021-08-23 09:43:03 +02:00 committed by GitHub
parent 12ca93cf27
commit 81344e6bd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 107 additions and 128 deletions

14
package-lock.json generated
View File

@ -4024,13 +4024,13 @@
} }
}, },
"svgo": { "svgo": {
"version": "2.3.1", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-2.3.1.tgz", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.4.0.tgz",
"integrity": "sha512-riDDIQgXpEnn0BEl9Gvhh1LNLIyiusSpt64IR8upJu7MwxnzetmF/Y57pXQD2NMX2lVyMRzXt5f2M5rO4wG7Dw==", "integrity": "sha512-W25S1UUm9Lm9VnE0TvCzL7aso/NCzDEaXLaElCUO/KaVitw0+IBicSVfM1L1c0YHK5TOFh73yQ2naCpVHEQ/OQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@trysound/sax": "0.1.1", "@trysound/sax": "0.1.1",
"chalk": "^4.1.0", "colorette": "^1.2.2",
"commander": "^7.1.0", "commander": "^7.1.0",
"css-select": "^4.1.3", "css-select": "^4.1.3",
"css-tree": "^1.1.2", "css-tree": "^1.1.2",
@ -4175,9 +4175,9 @@
} }
}, },
"uglify-js": { "uglify-js": {
"version": "3.14.0", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.0.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.1.tgz",
"integrity": "sha512-R/tiGB1ZXp2BC+TkRGLwj8xUZgdfT2f4UZEgX6aVjJ5uttPrr4fYmwTWDGqVnBCLbOXRMY6nr/BTbwCtVfps0g==", "integrity": "sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==",
"dev": true "dev": true
}, },
"universalify": { "universalify": {

View File

@ -26,9 +26,9 @@
"svg-path-bbox": "1.0.1", "svg-path-bbox": "1.0.1",
"svg-path-segments": "1.0.0", "svg-path-segments": "1.0.0",
"svglint": "1.0.8", "svglint": "1.0.8",
"svgo": "2.3.1", "svgo": "2.4.0",
"svgpath": "2.3.1", "svgpath": "2.3.1",
"uglify-js": "3.14.0" "uglify-js": "3.14.1"
}, },
"scripts": { "scripts": {
"build": "node scripts/build/package.js", "build": "node scripts/build/package.js",

View File

@ -1,126 +1,105 @@
const { extendDefaultPlugins } = require('svgo');
module.exports = { module.exports = {
multipass: true, multipass: true,
plugins: extendDefaultPlugins([ plugins: [
{ {
name: 'convertPathData', name: 'preset-default',
params: { params: {
overrides: {
// customize options
convertPathData: {
// 3 decimals of precision in floating point numbers // 3 decimals of precision in floating point numbers
floatPrecision: 3, floatPrecision: 3,
// Some editors (e.g. Adobe Illustrator and Sketch) cannot parse flags // Some editors (e.g. Adobe Illustrator and Sketch) cannot parse flags
// without space wrapping // without space wrapping
noSpaceAfterFlags: false, noSpaceAfterFlags: false,
}, },
},
// Sort the attributes on the <svg> tag // Sort the attributes on the <svg> tag
{ sortAttrs: {
name: 'sortAttrs',
params: {
order: ['role', 'viewBox'], order: ['role', 'viewBox'],
xmlnsOrder: 'end', xmlnsOrder: 'end',
}, },
},
// Convert basic shapes (such as <circle>) to <path> // Convert basic shapes (such as <circle>) to <path>
{ convertShapeToPath: {
name: 'convertShapeToPath',
params: {
// including <arc> // including <arc>
convertArcs: true, convertArcs: true,
}, },
},
// Compound all <path>s into one // Compound all <path>s into one
{ mergePaths: {
name: 'mergePaths',
params: {
force: true, force: true,
noSpaceAfterFlags: false, noSpaceAfterFlags: false,
}, },
},
// Keep the <title> tag // Keep the <title> tag
{ removeTitle: false,
name: 'removeTitle',
active: false,
},
// Keep the role="img" attribute and automatically add it // Keep the role="img" attribute and automatically add it
// to the <svg> tag if it's not there already // to the <svg> tag if it's not there already
{ addAttributesToSVGElement: {
name: 'addAttributesToSVGElement',
params: {
attributes: [ attributes: [
{role: 'img'}, {role: 'img'},
], ],
}, },
},
// Keep the 'role' attribute, if it's already defined // Keep the 'role' attribute, if it's already defined
{ removeUnknownsAndDefaults: {
name: 'removeUnknownsAndDefaults',
params: {
keepRoleAttr: true, keepRoleAttr: true,
}, },
},
// Remove all attributes except 'role', 'viewBox', and 'xmlns' from // Remove all attributes except 'role', 'viewBox', and 'xmlns' from
// <svg> tags // <svg> tags
{ removeAttrs: {
name: 'removeAttrs',
params: {
attrs: [ attrs: [
'baseProfile', 'baseProfile',
'version', 'version',
'fill-rule', 'fill-rule',
], ],
}, },
},
// Remove paths with fill="none" // Remove paths with fill="none"
{ removeUselessStrokeAndFill: {
name: 'removeUselessStrokeAndFill',
params: {
removeNone: true, removeNone: true,
}, },
},
// Explicitly enable everything else // Explicitly enable everything else
'removeDoctype', removeDoctype: true,
'removeXMLProcInst', removeXMLProcInst: true,
'removeComments', removeComments: true,
'removeMetadata', removeMetadata: true,
'removeEditorsNSData', removeEditorsNSData: true,
'cleanupAttrs', cleanupAttrs: true,
'inlineStyles', inlineStyles: true,
'minifyStyles', minifyStyles: true,
'convertStyleToAttrs', convertStyleToAttrs: true,
'cleanupIDs', cleanupIDs: true,
'prefixIds', prefixIds: true,
'removeRasterImages', removeRasterImages: true,
'removeUselessDefs', removeUselessDefs: true,
'cleanupNumericValues', cleanupNumericValues: true,
'cleanupListOfValues', cleanupListOfValues: true,
'convertColors', convertColors: true,
'removeNonInheritableGroupAttrs', removeNonInheritableGroupAttrs: true,
'removeViewBox', removeViewBox: true,
'cleanupEnableBackground', cleanupEnableBackground: true,
'removeHiddenElems', removeHiddenElems: true,
'removeEmptyText', removeEmptyText: true,
'moveElemsAttrsToGroup', moveElemsAttrsToGroup: true,
'moveGroupAttrsToElems', moveGroupAttrsToElems: true,
'collapseGroups', collapseGroups: true,
'convertTransform', convertTransform: true,
'removeEmptyAttrs', removeEmptyAttrs: true,
'removeEmptyContainers', removeEmptyContainers: true,
'removeUnusedNS', removeUnusedNS: true,
'removeDesc', removeDesc: true,
'removeDimensions', removeDimensions: true,
'removeStyleElement', removeStyleElement: true,
'removeScriptElement', removeScriptElement: true,
'removeOffCanvasPaths', removeOffCanvasPaths: true,
'reusePaths', reusePaths: true,
]), },
},
},
],
}; };