⬆️(tokens) migrate commander.js to 13.x from 12.x

Shortcut argument with several chars are no more accepted so we have to
rename `-cwd` option to `-w`.
This commit is contained in:
jbpenrath
2025-01-07 17:31:50 +01:00
committed by Jean-Baptiste PENRATH
parent 5718c0b8d1
commit 1c1300b9ef
3 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@openfun/cunningham-tokens": minor
---
Replace `-cwd` option by `-w`

View File

@@ -48,7 +48,7 @@ export const run = async (args: string[]) => {
":root",
)
.option(
"-cwd, --working-dir <directory>",
"-w, --working-dir <directory>",
"Specify the working dir ( you might not need this ).",
)
.option(

View File

@@ -133,7 +133,7 @@ describe("Cunningham Bin", () => {
// We must run the bin directly to be sure that it compiles the TS file. ( Importing TS from
// TS will always work )
await runBin(`-g css -cwd ${__dirname}`);
await runBin(`-g css -w ${__dirname}`);
expect(fs.existsSync(cssTokensFile)).toEqual(true);
expect(fs.readFileSync(cssTokensFile).toString()).toContain(`