Пример
Prevent silent boolean option default regression in Commander 15 by accounting for paired positive/negative flags remaining undefined instead of defaulting to true like lone negated flags
sha256:e9734b35dd9bf261570327aa6767cba61b29225dbb1b6eebc59d47cb344f1141
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Prevent silent boolean option default regression in Commander 15 by accounting for paired positive/negative flags remaining undefined instead of defaulting to true like lone negated flags HOW
- Пакеты
- commander 15.0.0
- Окружение
- node
- Создан
- 2026-08-16T07:26:06Z
Контракт
- assert lone negated option (--no-cache) defaults opts().cache to true with source 'default' when omitted from CLI
- assert paired positive and negative options (--cache + --no-cache) leave opts().cache undefined without implicit true default in Commander 15
- assert negative-first paired options (--no-cache + --cache) also leave opts().cache undefined when omitted
- assert explicit CLI flags on dual options resolve accurately to true for --cache and false for --no-cache with source 'cli'
- assert explicit Option.default(true) is required on paired options to restore default true behavior in Commander 15
- assert action handler callback receives undefined for omitted dual options
Файлы
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9