@optique/core 1.4.0-dev.2716 → 1.4.0-dev.2718
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/skills/optique/SKILL.md +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.4.0-dev.
|
|
3
|
+
"version": "1.4.0-dev.2718",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
},
|
|
246
246
|
"sideEffects": false,
|
|
247
247
|
"devDependencies": {
|
|
248
|
-
"@optique/env": "1.4.0-dev.
|
|
248
|
+
"@optique/env": "1.4.0-dev.2718+779844d0",
|
|
249
249
|
"@types/node": "^24.0.0",
|
|
250
250
|
"fast-check": "^4.7.0",
|
|
251
251
|
"tsdown": "^0.13.0",
|
package/skills/optique/SKILL.md
CHANGED
|
@@ -236,13 +236,11 @@ Common mistakes checklist
|
|
|
236
236
|
`parse()` in tests and embedded use. Do not pre-parse `process.argv`.
|
|
237
237
|
- Declare only static facts with `defineEmptyInputBehavior()` in
|
|
238
238
|
`@optique/core/extension`; use `inheritEmptyInputBehavior()` for
|
|
239
|
-
transparent wrappers. See
|
|
239
|
+
transparent wrappers. See [extension APIs].
|
|
240
240
|
- Do not treat `or(a, b)` as “zero or more alternatives.” Wrap it in
|
|
241
241
|
`optional()` or `withDefault()` to allow no matching branch.
|
|
242
|
-
-
|
|
243
|
-
|
|
244
|
-
- Do not forget that `flag("--x")` is required. Wrap it in `optional()` or
|
|
245
|
-
`withDefault(..., false)` for ordinary optional flags.
|
|
242
|
+
- Use `or(command(...), command(...))` for mutually exclusive subcommands.
|
|
243
|
+
- Wrap required `flag("--x")` in `optional()` or `withDefault(..., false)`.
|
|
246
244
|
- Do not expect `multiple(p)` to fail when absent; it returns `[]`. Wrap with
|
|
247
245
|
`nonEmpty()` when at least one value is required.
|
|
248
246
|
- Do not confuse free-order parsing with `seq()`. Most constructs let child
|
|
@@ -259,6 +257,8 @@ Common mistakes checklist
|
|
|
259
257
|
|
|
260
258
|
For the detailed maintained guide, use <https://optique.dev/pitfalls.md>.
|
|
261
259
|
|
|
260
|
+
[extension APIs]: https://optique.dev/concepts/extend.md
|
|
261
|
+
|
|
262
262
|
|
|
263
263
|
Reference links
|
|
264
264
|
---------------
|