Skip to content

refactor: replace fragile root option lookups with getRootOpts#184

Merged
iamfj merged 1 commit intonextfrom
refactor/issue-61-get-root-opts
Apr 27, 2026
Merged

refactor: replace fragile root option lookups with getRootOpts#184
iamfj merged 1 commit intonextfrom
refactor/issue-61-get-root-opts

Conversation

@iamfj
Copy link
Copy Markdown
Member

@iamfj iamfj commented Apr 26, 2026

Summary

  • add getRootOpts(command) in src/common/context.ts
  • replace fragile command.parent!.parent!.opts() lookups across command files
  • add a focused unit test and update affected command-test mocks

Verification

  • npm run check:ci
  • npm run generate
  • npx tsc --noEmit
  • npx tsc

Closes #61

@iamfj iamfj changed the base branch from main to next April 27, 2026 06:45
@iamfj iamfj force-pushed the refactor/issue-61-get-root-opts branch 2 times, most recently from bed7ae4 to 1f4f323 Compare April 27, 2026 09:37
@iamfj iamfj force-pushed the refactor/issue-61-get-root-opts branch from 1f4f323 to 2963db6 Compare April 27, 2026 09:39
@iamfj iamfj merged commit bce9024 into next Apr 27, 2026
9 checks passed
@iamfj iamfj deleted the refactor/issue-61-get-root-opts branch April 27, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: extract getRootOpts() helper to replace fragile parent chain navigation

1 participant