Repository navigation
Make order not matter for adding combo positive/negative options - #2405
Merged
shadowspawn merged 3 commits intoAug 4, 2025
Merged
shadowspawn merged 3 commits into
shadowspawn merged 3 commits into
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
shadowspawn
force-pushed
the
feature/combo-option-order-independent
branch
from
August 3, 2025 05:55
7e149d1 to
d1f9d8c
Compare
shadowspawn
marked this pull request as ready for review
August 3, 2025 06:03
abetomo
reviewed
Aug 3, 2025
Collaborator
Author
|
Released in v15: https://github.com/tj/commander.js/releases/tag/v15.0.0 |
huskas-2189
pushed a commit
to huskas-2189/Bookmark
that referenced
this pull request
Jun 14, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [commander](https://github.com/tj/commander.js) | [`14.0.3` → `15.0.0`](https://renovatebot.com/diffs/npm/commander/14.0.3/15.0.0) |  |  | --- ### Release Notes <details> <summary>tj/commander.js (commander)</summary> ### [`v15.0.0`](https://github.com/tj/commander.js/blob/HEAD/CHANGELOG.md#1500-2026-05-29) [Compare Source](tj/commander.js@v14.0.3...v15.0.0) Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below. The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for 12 months (to May 2027). For more info see [Release Policy](./docs/release-policy.md). ##### Added - show excess command-arguments in error message (\[[#​2384](tj/commander.js#2384)]) ##### Fixed - *Breaking:* only lone `--no-*` option sets default option value to `true`, default not implicitly set when define both positive and negative option in either order (\[[#​2405](tj/commander.js#2405)]) - update example to use compatible character for MINGW64 (\[[#​2475](tj/commander.js#2475)]) ##### Changed - *Breaking:* migrated Commander implementation from CommonJS to ESM (\[[#​2464](tj/commander.js#2464)]) - *Breaking:* Commander 15 requires Node.js v22.12.0 or higher (for `require(esm)`). - dev: switch tests from Jest to `node:test` test runner (\[[#​2463](tj/commander.js#2463)]) ##### Deleted - *Breaking:* removed deprecated export of `commander/esm.mjs` (\[[#​2464](tj/commander.js#2464)]) ##### Migration Tips Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework or bundler. If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will get security updates until May 2027 and things will hopefully improve for your setup in the meantime. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119--> Reviewed-on: https://codeberg.org/huskas-2189/Bookmark/pulls/85
huskas-2189
pushed a commit
to huskas-2189/Bookmark
that referenced
this pull request
Jun 19, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [commander](https://github.com/tj/commander.js) | [`14.0.3` → `15.0.0`](https://renovatebot.com/diffs/npm/commander/14.0.3/15.0.0) |  |  | --- ### Release Notes <details> <summary>tj/commander.js (commander)</summary> ### [`v15.0.0`](https://github.com/tj/commander.js/blob/HEAD/CHANGELOG.md#1500-2026-05-29) [Compare Source](tj/commander.js@v14.0.3...v15.0.0) Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below. The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for 12 months (to May 2027). For more info see [Release Policy](./docs/release-policy.md). ##### Added - show excess command-arguments in error message (\[[#​2384](tj/commander.js#2384)]) ##### Fixed - *Breaking:* only lone `--no-*` option sets default option value to `true`, default not implicitly set when define both positive and negative option in either order (\[[#​2405](tj/commander.js#2405)]) - update example to use compatible character for MINGW64 (\[[#​2475](tj/commander.js#2475)]) ##### Changed - *Breaking:* migrated Commander implementation from CommonJS to ESM (\[[#​2464](tj/commander.js#2464)]) - *Breaking:* Commander 15 requires Node.js v22.12.0 or higher (for `require(esm)`). - dev: switch tests from Jest to `node:test` test runner (\[[#​2463](tj/commander.js#2463)]) ##### Deleted - *Breaking:* removed deprecated export of `commander/esm.mjs` (\[[#​2464](tj/commander.js#2464)]) ##### Migration Tips Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework or bundler. If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will get security updates until May 2027 and things will hopefully improve for your setup in the meantime. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119--> Reviewed-on: https://codeberg.org/huskas-2189/Bookmark/pulls/85
huskas-2189
pushed a commit
to huskas-2189/Bookmark
that referenced
this pull request
Jun 19, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [commander](https://github.com/tj/commander.js) | [`14.0.3` → `15.0.0`](https://renovatebot.com/diffs/npm/commander/14.0.3/15.0.0) |  |  | --- ### Release Notes <details> <summary>tj/commander.js (commander)</summary> ### [`v15.0.0`](https://github.com/tj/commander.js/blob/HEAD/CHANGELOG.md#1500-2026-05-29) [Compare Source](tj/commander.js@v14.0.3...v15.0.0) Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below. The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for 12 months (to May 2027). For more info see [Release Policy](./docs/release-policy.md). ##### Added - show excess command-arguments in error message (\[[#​2384](tj/commander.js#2384)]) ##### Fixed - *Breaking:* only lone `--no-*` option sets default option value to `true`, default not implicitly set when define both positive and negative option in either order (\[[#​2405](tj/commander.js#2405)]) - update example to use compatible character for MINGW64 (\[[#​2475](tj/commander.js#2475)]) ##### Changed - *Breaking:* migrated Commander implementation from CommonJS to ESM (\[[#​2464](tj/commander.js#2464)]) - *Breaking:* Commander 15 requires Node.js v22.12.0 or higher (for `require(esm)`). - dev: switch tests from Jest to `node:test` test runner (\[[#​2463](tj/commander.js#2463)]) ##### Deleted - *Breaking:* removed deprecated export of `commander/esm.mjs` (\[[#​2464](tj/commander.js#2464)]) ##### Migration Tips Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework or bundler. If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will get security updates until May 2027 and things will hopefully improve for your setup in the meantime. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119--> Reviewed-on: https://codeberg.org/huskas-2189/Bookmark/pulls/85
1 task
imjohnbo
added a commit
to Kit/kit-cli
that referenced
this pull request
Dec 1, 2026
Commander 15 no longer sets a default of true when both --slim and --no-slim are defined (tj/commander.js#2405). Without an explicit default, opts.slim was undefined, so list commands stopped sending slim=true. Set the default on the hidden --slim option instead of relying on declaration order. Signed-off-by: John Bohannon <imjohnbo@kit.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Lone negated options default to true. (Historical.)
Positive then negative does not default to true. (By design.)
Negative then positive still defaults to true, for implementation reasons rather than by design.
See: #2397
Solution
Move the setting of the default to when the options are known.
Alternative approach to #2398. That PR retroactively removes the "default true" when the positive option is added second.
ChangeLog
Fix: only lone negated option defaults option value to true