refactor!: make Provide* return Hookable and take Invoker in hooks - #69
Merged
Merged
Conversation
Prefer an interface-first default API while keeping concrete wrappers and Container exported for advanced use. Add Pal.TreeJSON for inspect and unexport low-value plumbing (parseTag, context keys).
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #69 +/- ##
==========================================
- Coverage 78.72% 74.73% -4.00%
==========================================
Files 23 24 +1
Lines 1236 1302 +66
==========================================
Hits 973 973
- Misses 236 302 +66
Partials 27 27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Make the default public API interface-first while keeping concrete wrappers and Container importable for advanced/hackable use.
Changes
Provide/ProvideFn(and named variants) returnHookable[T]; factories/runner/list returnServiceDefLifecycleHooktakesInvokerinstead of*Pal;ProvideFngainsToInitwith hook priorityparseTagand context key plumbing (WithPal/FromContextonly)Pal.TreeJSON()/GraphToJSON; inspect usesTreeJSON()instead ofContainer().Graph()How To Test
task lint-fix go test ./...Checklist
Migration: update hook signatures to
pal.Invoker; stop naming concrete Provide return types (or type-assert); useFromContextinstead ofCtxValue; preferPal.TreeJSON()over inspect+Container for the dependency UI.