-
Notifications
You must be signed in to change notification settings - Fork 47
feat!: remove ctx transformer, add provider hooks #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
toddbaert
commented
Aug 9, 2022
- remove context transformer
- adds provider hooks
- updates to new hook ordering
- updates tests accordingly, included referenced spec numbers
| typeof this.provider.contextTransformer === 'function' | ||
| ? await this.provider.contextTransformer(mergedContext) | ||
| : mergedContext; | ||
| const frozenContext = await this.beforeHooks(allHooks, hookContext, options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chose this name because the context object is actually frozen (immutable here) after the before hooks have run...
Codecov Report
@@ Coverage Diff @@
## main #148 +/- ##
==========================================
+ Coverage 99.10% 99.53% +0.42%
==========================================
Files 9 9
Lines 446 426 -20
Branches 62 61 -1
==========================================
- Hits 442 424 -18
+ Misses 4 2 -2
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
BREAKING CHANGE: context transformer and related interfaces removed. Signed-off-by: Todd Baert <[email protected]>
benjiro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
/publish |
|
Tested this in the playground, looks good. |
🤖 I have created a release *beep* *boop* --- ## [0.4.0](js-sdk-v0.3.2...js-sdk-v0.4.0) (2022-09-20) ### ⚠ BREAKING CHANGES * improve generic type accuracy (#224) * convert to chainable methods (#221) * remove flag evaluation options from the provider interface (#185) * context transformer and related interfaces removed. ### Features * add client context mutation ([#207](#207)) ([5b0442a](5b0442a)) * add logger ([#219](#219)) ([763f167](763f167)) * convert to chainable methods ([#221](#221)) ([5253ad9](5253ad9)) * improve generic type accuracy ([#224](#224)) ([12230a5](12230a5)) * remove ctx transformer, add provider hooks ([#148](#148)) ([260432c](260432c)) * remove flag evaluation options from the provider interface ([#185](#185)) ([e9852e4](e9852e4)), closes [#183](#183) ### Bug Fixes * Add no-op tests ([#99](#99)) ([a341f5c](a341f5c)) * Dont push experiemental branches ([#101](#101)) ([0a7a5ec](0a7a5ec)) * Fix publish command ([#103](#103)) ([4742ef1](4742ef1)) * Fixing error with setProvider type ([#121](#121)) ([df5d214](df5d214)) * update the client to conform to the provider interface ([#187](#187)) ([f1edb29](f1edb29)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>