Skip to content

Commit 1bb5bbe

Browse files
authored
chore!: Update commander to v11 (#2004)
1 parent 32edd7b commit 1bb5bbe

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

lib/svgo/coa.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import { encodeSVGDatauri, decodeSVGDatauri } from './tools.js';
66
import { loadConfig, optimize } from '../svgo-node.js';
77
import { builtin } from '../builtin.js';
88

9+
/**
10+
* @typedef {import('commander').Command} Command
11+
*/
12+
913
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1014
const pkgPath = path.join(__dirname, '../../package.json');
1115
const PKG = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
@@ -25,14 +29,15 @@ export function checkIsDir(filePath) {
2529
}
2630
}
2731

32+
/**
33+
* @param {Command} program
34+
*/
2835
export default function makeProgram(program) {
2936
program
3037
.name(PKG.name)
31-
.description(PKG.description, {
32-
INPUT: 'Alias to --input',
33-
})
38+
.description(PKG.description)
3439
.version(PKG.version, '-v, --version')
35-
.arguments('[INPUT...]')
40+
.argument('[INPUT...]', 'Alias to --input')
3641
.option('-i, --input <INPUT...>', 'Input files, "-" for STDIN')
3742
.option('-s, --string <STRING>', 'Input SVG data string')
3843
.option(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
]
102102
},
103103
"dependencies": {
104-
"commander": "^7.2.0",
104+
"commander": "^11.1.0",
105105
"css-select": "^5.1.0",
106106
"css-tree": "^2.3.1",
107107
"css-what": "^6.1.0",

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,20 +1685,20 @@ __metadata:
16851685
languageName: node
16861686
linkType: hard
16871687

1688+
"commander@npm:^11.1.0":
1689+
version: 11.1.0
1690+
resolution: "commander@npm:11.1.0"
1691+
checksum: fd1a8557c6b5b622c89ecdfde703242ab7db3b628ea5d1755784c79b8e7cb0d74d65b4a262289b533359cd58e1bfc0bf50245dfbcd2954682a6f367c828b79ef
1692+
languageName: node
1693+
linkType: hard
1694+
16881695
"commander@npm:^2.20.0":
16891696
version: 2.20.3
16901697
resolution: "commander@npm:2.20.3"
16911698
checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e
16921699
languageName: node
16931700
linkType: hard
16941701

1695-
"commander@npm:^7.2.0":
1696-
version: 7.2.0
1697-
resolution: "commander@npm:7.2.0"
1698-
checksum: 53501cbeee61d5157546c0bef0fedb6cdfc763a882136284bed9a07225f09a14b82d2a84e7637edfd1a679fb35ed9502fd58ef1d091e6287f60d790147f68ddc
1699-
languageName: node
1700-
linkType: hard
1701-
17021702
"commondir@npm:^1.0.1":
17031703
version: 1.0.1
17041704
resolution: "commondir@npm:1.0.1"
@@ -4506,7 +4506,7 @@ __metadata:
45064506
"@types/jest": ^29.5.12
45074507
"@types/node": ^20.12.11
45084508
"@types/sax": ^1.2.7
4509-
commander: ^7.2.0
4509+
commander: ^11.1.0
45104510
cross-env: ^7.0.3
45114511
css-select: ^5.1.0
45124512
css-tree: ^2.3.1

0 commit comments

Comments
 (0)