Skip to content

[args] Add OptionBundle, Option.copyTo, and typed.dart export (3/3) - #1017

Draft
kevmoo wants to merge 2 commits into
args-typed-2-int-enumfrom
args-typed-3-bundles
Draft

kevmoo wants to merge 2 commits into
args-typed-2-int-enumfrom
args-typed-3-bundles

Conversation

@kevmoo

@kevmoo kevmoo commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Adds OptionBundle, ValueOptionBundle<T>, Option.copyTo, and the public package:args/typed.dart entrypoint with zero dependency on command_runner.dart and zero changes to args.dart or command_runner.dart public APIs.

…typed.dart export (3/3)

- Add `OptionBundle` and `ValueOptionBundle<T>` with diamond-idempotent
  registration and separator headers.
- Add `CommandSafeArgResults` on `Command` (`getValue`, `getBundle`,
  `wasProvided`, `wasParsed`, `hasOption`, `registerOptionBundle`,
  `registerOptionBundles`) and `Option.copyTo` on `TypedOptionExtension`.
- Export `package:args/typed.dart` and document in `CHANGELOG.md`.
- Export all public typed option types and extensions from `typed.dart`
  using explicit `show` combinators.
- Update `ValueOptionBundle.parse` to take `ArgResults` directly and
  decouple `option_bundle.dart` from `command_runner.dart`.
- Add `registerBundle`, `registerBundles`, and `Option.copyTo` in
  `typed_extensions.dart`.
- Update `CHANGELOG.md` and `typed_test.dart` for bundle registration,
  separator deduplication, and `CommandRunner` usage.
@kevmoo kevmoo changed the title [args] Add OptionBundle, Command extensions, Option.copyTo, and typed.dart export (3/3) [args] Add OptionBundle, Option.copyTo, and typed.dart export (3/3) Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant