Skip to content

Conversation

@toddbaert
Copy link
Member

  • remove context transformer
  • adds provider hooks
  • updates to new hook ordering
  • updates tests accordingly, included referenced spec numbers

@toddbaert toddbaert changed the title Add provider hooks, update ordering feat: Add provider hooks, update ordering Aug 9, 2022
typeof this.provider.contextTransformer === 'function'
? await this.provider.contextTransformer(mergedContext)
: mergedContext;
const frozenContext = await this.beforeHooks(allHooks, hookContext, options);
Copy link
Member Author

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-commenter
Copy link

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #148 (7d804f4) into main (2770b4d) will increase coverage by 0.42%.
The diff coverage is 100.00%.

@@            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     
Impacted Files Coverage Δ
src/client.ts 100.00% <100.00%> (ø)
src/open-feature.ts 96.77% <100.00%> (+2.40%) ⬆️

📣 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]>
Copy link
Member

@benjiro benjiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@toddbaert
Copy link
Member Author

/publish

@toddbaert toddbaert changed the title feat: Add provider hooks, update ordering BREAKING CHANGE: Add provider hooks, update ordering Aug 10, 2022
@toddbaert toddbaert changed the title BREAKING CHANGE: Add provider hooks, update ordering BREAKING CHANGE: remove ctx transformer, add provider hooks Aug 10, 2022
@toddbaert toddbaert changed the title BREAKING CHANGE: remove ctx transformer, add provider hooks feat!: remove ctx transformer, add provider hooks Aug 10, 2022
@toddbaert
Copy link
Member Author

Tested this in the playground, looks good.

@toddbaert toddbaert merged commit 260432c into open-feature:main Aug 10, 2022
toddbaert pushed a commit that referenced this pull request Sep 20, 2022
🤖 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>
This was referenced Oct 11, 2022
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.

4 participants