Repository navigation
feat(plugin-subcommands-advanced): add Command.OptionsOf and Subcommand.OptionsOf - #231
Conversation
…nd.OptionsOf Re-export the framework's Command.OptionsOf so command classes importing Command from this package can type their generated options. Requires @wolfstar/http-framework 6.2.0, so the devDependency moves to ^6.2.0.
|
2 findings · reviewed 🟠 New command types break supported framework 6.1 consumers ·
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
ℹ️ No critical issues — one minor note inline.
Reviewed changes
Reviewed the single commit adding OptionsOf to the plugin's Command and Subcommand namespaces. I checked the type against the published @wolfstar/http-framework@6.2.2 declarations (CommandOptionsRegistry and Command.OptionsOf<K extends keyof CommandOptionsRegistry>), and the alias matches.
Command.OptionsOf/Subcommand.OptionsOf— aliases of the framework type, with the constraint written againstCommandOptionsRegistryso codegen augmentation resolves correctly.- devDependency bump —
@wolfstar/http-framework^6.1.0→^6.2.0inplugin-subcommands-advanced; the lockfile only moves this package (plus its test-utils peer resolution) to 6.2.2. pnpm-workspace.yaml—minimumReleaseAgeExcludeextended for the new framework, CLI, kit, nitro-server, schema and vite-server versions.- Changeset — minor bump for
@wolfstar/plugin-subcommands-advanced.
Beyond that note, there is also no test for the new alias. A small expectTypeOf check in tests/ (augmenting CommandOptionsRegistry) would guard against the alias drifting from the framework type, though it isn't blocking.
claude-sonnet-5-5 | 𝕏
@wolfstar/plugin-api
@wolfstar/plugin-broker
@wolfstar/plugin-cache
@wolfstar/plugin-gateway
@wolfstar/plugin-i18next
@wolfstar/plugin-logger
@wolfstar/plugin-scheduled-tasks
@wolfstar/plugin-sharder
@wolfstar/plugin-subcommands-advanced
commit: |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the one commit pushed since the prior Pullfrog review (cd62bf8).
- README note — added a bullet to
packages/plugin-subcommands-advanced/README.mdsayingCommand.OptionsOf/Subcommand.OptionsOfneed@wolfstar/http-framework6.2.0 or later, and that older frameworks fail to resolve the type whenskipLibCheckis off. This addresses the earlier inline note, so I resolved that thread.
The earlier optional suggestion still stands: a small expectTypeOf test would guard the alias against drifting from the framework type. It isn't blocking.
claude-sonnet-5-5 | 𝕏

🔗 Linked issue
N/A
🧭 Context
@wolfstar/http-framework6.2.0 addedCommand.OptionsOf<K>, which reads theCommandOptionsRegistrygenerated bystars codegen. Command classes that importCommandfrom@wolfstar/plugin-subcommands-advancedcould not use it, because the plugin'sCommandnamespace only re-exported a fixed set of framework types andOptionsOfwas not among them.📚 Description
Adds
OptionsOfto theCommandandSubcommandnamespaces of the plugin, as an alias of the framework'sCommand.OptionsOf. Subcommand classes can now type their options without importingCommandfrom the framework as well.The type only exists from framework 6.2.0, so the package's
@wolfstar/http-frameworkdevDependency moves from^6.1.0to^6.2.0(resolves to 6.2.2; 6.3.0 is still blocked byminimumReleaseAge). The peer range is unchanged. On an older framework the type errors only for consumers compiling withskipLibCheckoff.Key changes
src/lib/structures/command.tsCommand.OptionsOfandSubcommand.OptionsOfpackage.json@wolfstar/http-framework^6.1.0→^6.2.0pnpm-lock.yaml,pnpm-workspace.yamlpnpm install;minimumReleaseAgeExcludenow also lists 6.2.2 and newercli,kit,nitro-server,schemaandvite-server.changeset/subcommands-options-of.mdREADME.mdOptionsOfneeds framework 6.2.0 or laterType of Change
Pre-flight Checklist
pnpm changeset(orpnpm changeset add --emptyif no release is needed). See .changeset/README.md.