Skip to content

feat: add init/shutdown and events #436

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

Merged

Conversation

lukas-reining
Copy link
Member

@lukas-reining lukas-reining commented May 25, 2023

This PR

Implements init/shutdown and events support from spec version 0.6.0. #424 #434 #435

Related Issues

Fixes #434
Fixes #435

Notes

Moved as much code as possible to the shared package.
Maybe we could even share some more code of the client.

Follow-up Tasks

How to test

Tests are included for both client and server.

@lukas-reining lukas-reining requested a review from a team May 25, 2023 10:37
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #436 (f3c3a14) into main (310c6ac) will increase coverage by 0.03%.
The diff coverage is 99.02%.

@@            Coverage Diff             @@
##             main     #436      +/-   ##
==========================================
+ Coverage   99.44%   99.47%   +0.03%     
==========================================
  Files          24       25       +1     
  Lines        2331     2468     +137     
  Branches      211      236      +25     
==========================================
+ Hits         2318     2455     +137     
  Misses         13       13              
Impacted Files Coverage Δ
packages/shared/src/events.ts 98.36% <98.36%> (ø)
packages/shared/src/open-feature.ts 99.13% <98.95%> (-0.87%) ⬇️
packages/client/src/client.ts 98.94% <100.00%> (+0.01%) ⬆️
packages/client/src/open-feature.ts 95.60% <100.00%> (-1.50%) ⬇️
packages/client/src/types.ts 100.00% <100.00%> (ø)
packages/server/src/client.ts 100.00% <100.00%> (ø)
packages/server/src/no-op-provider.ts 100.00% <100.00%> (ø)
packages/server/src/open-feature.ts 100.00% <100.00%> (+1.12%) ⬆️
packages/server/src/types.ts 100.00% <100.00%> (ø)
packages/shared/src/index.ts 100.00% <100.00%> (ø)
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lukas-reining lukas-reining force-pushed the feat/434-435-init-shutdown-events branch 2 times, most recently from 7591d9f to 9894e08 Compare May 25, 2023 11:30
@toddbaert
Copy link
Member

@lukas-reining I'll manually test this tomorrow (just to make sure everything still bundles/packages nicely) but once the remaining issues are closed it think this is good to merge from my perspective.

@lukas-reining lukas-reining requested a review from a team as a code owner May 26, 2023 08:37
@toddbaert toddbaert self-requested a review May 26, 2023 16:37
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

I've tested the packaging locally and consumed the web and server SDKs in a web app, and esm and commonjs node apps. Everything looks great and I didn't have any breaking changes.

Nothing else to say except excellent work. Approving.

@toddbaert
Copy link
Member

toddbaert commented May 26, 2023

I encourage any @open-feature/sdk-javascript-approvers @open-feature/sdk-javascript-maintainers and @open-feature/technical-steering-committee to review. I'll merge this next week unless I hear objections.

@toddbaert toddbaert changed the title feat: implement init/shutdown and events feat: add init/shutdown and events May 26, 2023
Copy link
Member

@beeme1mr beeme1mr left a comment

Choose a reason for hiding this comment

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

I noticed a few little things, but overall it looks great. Thank you very much for all your hard work.

Co-authored-by: Michael Beemer <[email protected]>
Signed-off-by: Lukas Reining <[email protected]>
Copy link
Contributor

@weyert weyert left a comment

Choose a reason for hiding this comment

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

Thank you, looks good to me! Excited about the shutdown change :)

Signed-off-by: Lukas Reining <[email protected]>
@toddbaert toddbaert merged commit 5d55ea1 into open-feature:main May 30, 2023
beeme1mr pushed a commit that referenced this pull request Jun 6, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.0.4](shared-v0.0.3...shared-v0.0.4)
(2023-06-06)


### Features

* add init/shutdown and events
([#436](#436))
([5d55ea1](5d55ea1))
* add named client support
([#429](#429))
([310c6ac](310c6ac))
* add support for flag metadata
([#426](#426))
([029ec26](029ec26))


### Bug Fixes

* only shutdown providers that are not attached to any client
([#444](#444))
([7e469c4](7e469c4))

---
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>
beeme1mr pushed a commit that referenced this pull request Jun 6, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.3.3-experimental](web-sdk-v0.3.2-experimental...web-sdk-v0.3.3-experimental)
(2023-06-06)


### Features

* add init/shutdown and events
([#436](#436))
([5d55ea1](5d55ea1))
* add named client support
([#429](#429))
([310c6ac](310c6ac))
* add support for flag metadata
([#426](#426))
([029ec26](029ec26))


### Bug Fixes

* bundlers wrongly resolving server/client modules
([#445](#445))
([6acddd5](6acddd5))
* only shutdown providers that are not attached to any client
([#444](#444))
([7e469c4](7e469c4))

---
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>
beeme1mr added a commit that referenced this pull request Jun 6, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](js-sdk-v1.2.0...js-sdk-v1.3.0)
(2023-06-06)


### Features

* add init/shutdown and events
([#436](#436))
([5d55ea1](5d55ea1))
* add named client support
([#429](#429))
([310c6ac](310c6ac))
* add support for flag metadata
([#426](#426))
([029ec26](029ec26))


### Bug Fixes

* bundlers wrongly resolving server/client modules
([#445](#445))
([6acddd5](6acddd5))
* only shutdown providers that are not attached to any client
([#444](#444))
([7e469c4](7e469c4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Beemer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement events: open-feature/spec@bf9e45b implement initialization/shutdown: open-feature/spec@a4ffec3
5 participants