Skip to content

Commit f7eb027

Browse files
authored
Merge pull request #238 from coat-dev/renovate/commander-10.x
fix(deps): update dependency commander to v10
2 parents 2b92aa9 + ab8e569 commit f7eb027

File tree

5 files changed

+40
-48
lines changed

5 files changed

+40
-48
lines changed

package-lock.json

+26-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"ajv": "8.12.0",
1313
"boxen": "5.1.2",
1414
"chalk": "4.1.2",
15-
"commander": "9.5.0",
15+
"commander": "10.0.0",
1616
"execa": "5.1.1",
1717
"fs-extra": "11.1.0",
1818
"immer": "9.0.19",

packages/cli/src/bin/cli.ts

+8-18
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ export function createProgram(): Command {
1717

1818
program
1919
.command("create <template> [dir] [projectName]")
20-
.description("Create a new project based on the coat template.")
21-
.helpOption(
22-
undefined,
23-
'\n\nArguments:\ntemplate (required): The name of coat template from the npm registry (e.g. "@coat/template-ts-package")\n\ndir (optional): The directory where coat should create a project. Resolves to a relative path from the current working directory\n\nprojectName (optional): The name of your new project. Will use the trailing folder name of the project directory by default'
20+
.description(
21+
'Create a new project based on the coat template.\n\nArguments:\ntemplate (required): The name of coat template from the npm registry (e.g. "@coat/template-ts-package")\n\ndir (optional): The directory where coat should create a project. Resolves to a relative path from the current working directory\n\nprojectName (optional): The name of your new project. Will use the trailing folder name of the project directory by default'
2422
)
2523
.action(async (template, directory, projectName) => {
2624
await create({ template, directory, projectName });
@@ -29,26 +27,20 @@ export function createProgram(): Command {
2927
program
3028
.command("setup")
3129
.description("Runs all setup tasks of the current coat project")
32-
.helpOption(
33-
undefined,
34-
"\n\nGathers all setup tasks of the extended templates and runs them in sequential order."
35-
)
3630
.action(async () => {
3731
await setup({ cwd: process.cwd(), force: true });
3832
});
3933

4034
program
4135
.command("sync")
42-
.description("Generates all files of the current coat project.")
36+
.description(
37+
'Generates all files of the current coat project.\nGathers all files of the extended templates, merges them and places them in the project directory.\n\nGenerated files can be extended by placing a file next to it with the "-custom.js" suffix and exporting a function that returns the customized content.'
38+
)
4339
.option(
4440
"--check",
4541
"Checks whether the coat project is in sync or whether there are any pending global file operations. Useful on CI systems to determine whether coat sync needs to be run."
4642
)
4743
.option("--skipInstall", "Skips the installation of dependencies.")
48-
.helpOption(
49-
undefined,
50-
'\n\nGathers all files of the extended templates, merges them and places them in the project directory.\n\nGenerated files can be extended by placing a file next to it with the "-custom.js" suffix and exporting a function that returns the customized content.'
51-
)
5244
.action(async (options) => {
5345
await sync({
5446
cwd: process.cwd(),
@@ -59,12 +51,10 @@ export function createProgram(): Command {
5951

6052
program
6153
.command("run <scriptPattern> [otherScriptPatterns...]")
62-
.description("Runs one or multiple package.json scripts in parallel")
63-
.allowUnknownOption()
64-
.helpOption(
65-
undefined,
66-
'\n\nYou can run multiple scripts by specifying a wildcard, e.g. coat run build:* will run all scripts that are prefixed with build: inside the package.json scripts object.\n\nAll arguments after the first dash ("-") will be passed to each script, e.g. "coat run build --watch" will call the build script with "--watch"'
54+
.description(
55+
'Runs one or multiple package.json scripts in parallel\n\nYou can run multiple scripts by specifying a wildcard, e.g. coat run build:* will run all scripts that are prefixed with build: inside the package.json scripts object.\n\nAll arguments after the first dash ("-") will be passed to each script, e.g. "coat run build --watch" will call the build script with "--watch"'
6756
)
57+
.allowUnknownOption()
6858
.action(async (scriptPattern, otherScriptPatterns) => {
6959
try {
7060
await run({

packages/cli/test/setup/general.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ describe("setup - general", () => {
2424
const helpLines = [
2525
"Usage: coat setup [options]",
2626
"Runs all setup tasks of the current coat project",
27-
"Gathers all setup tasks of the extended templates and runs them in sequential order.",
2827
];
2928
helpLines.forEach((helpLine) => {
3029
expect(helpArgument.stdout).toContain(helpLine);

packages/cli/test/sync/general.test.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ describe("coat sync - general", () => {
2020
const helpLines = [
2121
"Usage: coat sync [options]",
2222
"Generates all files of the current coat project.",
23-
"Gathers all files of the extended templates, merges them and places them in the project directory.",
24-
'Generated files can be extended by placing a file next to it with the "-custom.js" suffix and exporting a function that returns the customized content.',
23+
"Gathers all files of the extended templates, merges them and places them in the",
24+
"project directory.",
25+
"Generated files can be extended by placing a file next to it with the",
26+
'"-custom.js" suffix and exporting a function that returns the customized',
27+
"content.",
2528
"--check",
2629
"--skipInstall",
2730
"Skips the installation of dependencies.",

0 commit comments

Comments
 (0)