Skip to content

Commit 943a815

Browse files
committed
feat: Makes version optional in the CLI
1 parent feffcde commit 943a815

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @taskless/packcheck
22

3+
## 0.0.18
4+
5+
### Patch Changes
6+
7+
- Makes format for pack check optional, defaulting to test output
8+
39
## 0.0.17
410

511
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@taskless/pack",
33
"description": "CLI for working with Taskless packs",
4-
"version": "0.0.17",
4+
"version": "0.0.18",
55
"author": "Taskless",
66
"license": "Apache-2.0",
77
"repository": "taskless/pack",

src/cli.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ program
2020
.requiredOption("--fixture <fixture>", "Path to the fixture file")
2121
.requiredOption("--manifest <manifest>", "Path to the manifest file")
2222
.requiredOption("--wasm <wasm>", "Path to the wasm file")
23-
.requiredOption(
23+
.option(
2424
"--format <format>",
25-
"Output format. One of json, ndjson, none, test",
25+
"Output format. One of json, ndjson, none, test. Defaults to test",
2626
(value) => {
27-
const validFormats = ["json", "ndjson", "none", "test"];
27+
const validFormats = ["json", "ndjson", "none", "test", "", undefined];
2828
if (validFormats.includes(value)) {
29+
if (value === "" || value === undefined) {
30+
return "test"; // Default to json if empty
31+
}
32+
2933
return value;
3034
}
3135

0 commit comments

Comments
 (0)