Skip to content

fix(kamado): correct lifecycle hook parameter types from Config to Context#75

Merged
YusukeHirao merged 1 commit intomainfrom
fix/lifecycle-hook-types
Feb 4, 2026
Merged

fix(kamado): correct lifecycle hook parameter types from Config to Context#75
YusukeHirao merged 1 commit intomainfrom
fix/lifecycle-hook-types

Conversation

@YusukeHirao
Copy link
Copy Markdown
Member

Summary

  • Fix type definitions for onBeforeBuild and onAfterBuild lifecycle hooks
  • Change parameter type from Config to Context to match actual implementation

Details

The lifecycle hooks were typed to receive Config, but the implementation in build.ts actually passes Context (which extends Config and includes the mode field). This fix aligns the type definitions with:

  1. The actual implementation (await context.onBeforeBuild?.(context))
  2. The documentation (which correctly states hooks receive Context)

Test plan

  • yarn lint passes
  • yarn build passes
  • npx vitest run passes (178 tests)

🤖 Generated with Claude Code

…ntext

The onBeforeBuild and onAfterBuild hooks were typed to receive Config,
but the implementation actually passes Context (which includes mode).
This aligns the types with both the implementation and documentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@YusukeHirao YusukeHirao merged commit 815773c into main Feb 4, 2026
1 check passed
@YusukeHirao YusukeHirao deleted the fix/lifecycle-hook-types branch February 4, 2026 10:20
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.

1 participant