From df7d5b95ac139f620d68afc09c1123e9bb57b5b6 Mon Sep 17 00:00:00 2001 From: Volker E Date: Tue, 16 Jan 2024 00:17:03 +0100 Subject: [PATCH] build: Update 'svgo' to latest v3.2.0 and re-minify SVGs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The latest update of 'svgo' dependency includes three optimizations on converting path commands, which - improves closing paths and how we determine if to use absolute or relative commands. - round arc or convert to lines based on the geometric sagitta - convert cubic Bézier curves to quadratic Bézier curves where possible Also unifiying npm command to qua standard notation `minify:svg`. Bug: T354875 Change-Id: I38ccbfa62ee7afcfb10eee7853b33648863f54ad --- package-lock.json | 20 +++++++------ package.json | 4 +-- .../slide1-ltr.svg | 2 +- .../slide1-rtl.svg | 30 +++++++++---------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc548e7c..333fdd30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "grunt-stylelint": "0.19.0", "mwbot": "1.0.10", "stylelint-config-wikimedia": "0.16.1", - "svgo": "3.0.2", + "svgo": "3.2.0", "wdio-mediawiki": "2.3.0" } }, @@ -10445,15 +10445,16 @@ "dev": true }, "node_modules/svgo": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz", - "integrity": "sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.2.0.tgz", + "integrity": "sha512-4PP6CMW/V7l/GmKRKzsLR8xxjdHTV4IMvhTnpuHwwBazSIlw5W/5SmPjN8Dwyt7lKbSJrRDgp4t9ph0HgChFBQ==", "dev": true, "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", - "css-tree": "^2.2.1", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", "csso": "^5.0.5", "picocolors": "^1.0.0" }, @@ -19198,15 +19199,16 @@ "dev": true }, "svgo": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz", - "integrity": "sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.2.0.tgz", + "integrity": "sha512-4PP6CMW/V7l/GmKRKzsLR8xxjdHTV4IMvhTnpuHwwBazSIlw5W/5SmPjN8Dwyt7lKbSJrRDgp4t9ph0HgChFBQ==", "dev": true, "requires": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", - "css-tree": "^2.2.1", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", "csso": "^5.0.5", "picocolors": "^1.0.0" } diff --git a/package.json b/package.json index feb54111..10f7c3fa 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "RevisionSlider", "private": true, "scripts": { - "minify-svg": "svgo --config=.svgo.config.js --quiet --recursive --folder resources/", + "minify:svg": "svgo --config=.svgo.config.js --quiet --recursive --folder resources/", "selenium-daily": "npm run selenium-test", "selenium-test": "wdio tests/selenium/wdio.conf.js", "test": "grunt test" @@ -20,7 +20,7 @@ "grunt-stylelint": "0.19.0", "mwbot": "1.0.10", "stylelint-config-wikimedia": "0.16.1", - "svgo": "3.0.2", + "svgo": "3.2.0", "wdio-mediawiki": "2.3.0" } } diff --git a/resources/ext.RevisionSlider.helpDialog/slide1-ltr.svg b/resources/ext.RevisionSlider.helpDialog/slide1-ltr.svg index 2aa79fd1..4101d4f5 100644 --- a/resources/ext.RevisionSlider.helpDialog/slide1-ltr.svg +++ b/resources/ext.RevisionSlider.helpDialog/slide1-ltr.svg @@ -3,7 +3,7 @@ - + diff --git a/resources/ext.RevisionSlider.helpDialog/slide1-rtl.svg b/resources/ext.RevisionSlider.helpDialog/slide1-rtl.svg index 003f5fa0..43a578a6 100644 --- a/resources/ext.RevisionSlider.helpDialog/slide1-rtl.svg +++ b/resources/ext.RevisionSlider.helpDialog/slide1-rtl.svg @@ -1,27 +1,27 @@ - - + + - - - - + + + + - - - - + + + + - + - + - - - + + +