Skip to content
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

fix: missing events bundled dep #660

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Nov 8, 2023

Fixes: #659

This PR fixes an issue created with this change, which removed the events polyfill package from @openfeature/core where is wasn't always needed (see that issue for details). The problem was that we still imported events in the @openfeature/core module, but can't use the events bundled in the @openfeature/web-sdk since the bundled package there isn't accessible from imports in @openfeature/core.

This PR removes all imports of events from @openfeature/core, and instead only imports types. Imports of events only now occur in the web-sdk (where it's bundled) and server-sdk (where it's made available by the node runtime), not in the common module.

Unfortunately this issue was a bit tough to track down, because events is VERY common, and lots of bundlers, etc will add it, so it's frequently available "accidentally".

Thanks to @juanparadox for the report.

@toddbaert toddbaert requested a review from a team as a code owner November 8, 2023 18:28
@toddbaert toddbaert marked this pull request as draft November 8, 2023 18:39
@toddbaert toddbaert force-pushed the fix/missing-events-bundled-dep branch from afbd9ac to 1b26152 Compare November 8, 2023 20:38
@toddbaert toddbaert marked this pull request as ready for review November 8, 2023 20:49
@toddbaert toddbaert force-pushed the fix/missing-events-bundled-dep branch from 1b26152 to 337eefb Compare November 8, 2023 21:01
@juanparadox
Copy link
Member

@toddbaert This is awesome. Thank you so much for moving on this so quickly. We were doing some discovery work on available feature flagging tools for the web and this is at the top of our adoption list 😄

@toddbaert
Copy link
Member Author

toddbaert commented Nov 8, 2023

@toddbaert This is awesome. Thank you so much for moving on this so quickly. We were doing some discovery work on available feature flagging tools for the web and this is at the top of our adoption list 😄

Thanks for finding the issue.

FWIW, I think if you use the last published versions of @openfeature/core and @openfeature/web-sdk, you will not have this issue. I will try to get this fix released tonight though, or as soon as it's reviewed.

@toddbaert toddbaert added this pull request to the merge queue Nov 9, 2023
Merged via the queue into main with commit f0e2aa6 Nov 9, 2023
9 checks passed
@toddbaert toddbaert deleted the fix/missing-events-bundled-dep branch November 9, 2023 13:58
toddbaert pushed a commit that referenced this pull request Nov 9, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.0.18](core-v0.0.17...core-v0.0.18)
(2023-11-09)


### 🐛 Bug Fixes

* missing events bundled dep
([#660](#660))
([f0e2aa6](f0e2aa6))

---
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: OpenFeature Bot <[email protected]>
Signed-off-by: openfeature-peer-update-bot <[email protected]>
Co-authored-by: openfeature-peer-update-bot <[email protected]>
toddbaert pushed a commit that referenced this pull request Nov 9, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.4.5](web-sdk-v0.4.4...web-sdk-v0.4.5)
(2023-11-09)


### 🐛 Bug Fixes

* missing events bundled dep
([#660](#660))
([f0e2aa6](f0e2aa6))


### 🧹 Chore

* **main:** release core 0.0.18
([#661](#661))
([cf7bbf0](cf7bbf0))

---
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: OpenFeature Bot <[email protected]>
toddbaert added a commit that referenced this pull request Nov 9, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.7.2](server-sdk-v1.7.1...server-sdk-v1.7.2)
(2023-11-09)


### 🐛 Bug Fixes

* missing events bundled dep
([#660](#660))
([f0e2aa6](f0e2aa6))


### 🧹 Chore

* **main:** release core 0.0.18
([#661](#661))
([cf7bbf0](cf7bbf0))

---
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: OpenFeature Bot <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
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.

[BUG] Importing the @openfeature/launchdarkly-client-provider throws a TypeError
4 participants