-
Notifications
You must be signed in to change notification settings - Fork 32
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: remove events.js from core module #650
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Todd Baert <[email protected]>
toddbaert
commented
Nov 2, 2023
toddbaert
changed the title
fix: remove events.js from core
fix: remove events.js from core module
Nov 2, 2023
lukas-reining
approved these changes
Nov 3, 2023
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.
Looks good to me!
Kavindu-Dodan
approved these changes
Nov 3, 2023
beeme1mr
approved these changes
Nov 3, 2023
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.
Good idea, nice find.
toddbaert
pushed a commit
that referenced
this pull request
Nov 3, 2023
🤖 I have created a release *beep* *boop* --- ## [0.0.17](core-v0.0.16...core-v0.0.17) (2023-11-03) ### Bug Fixes * remove events.js from core module ([#650](#650)) ([14441b1](14441b1)) --- 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]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 9, 2023
Fixes: #659 This PR fixes an issue created with [this change](#650), 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. --------- Signed-off-by: Todd Baert <[email protected]>
This was referenced Mar 12, 2024
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.
Optimization to
@openfeature/core
package. Both server and web need the node-jsEvents
interfaces, but obviously only the web needs them poly-filled (they come with node).This PR:
events.js
as an external dep in@openfeature/core
meaning it won't be bundled there (see esbuild doc)This means that now
@openfeature/core
no longer includesevents.js
(an un-needed polyfill for the server). The bundling pictured below only happens in thedist/
of@openfeature/web-sdk
, and no longer in@openfeature/core
:I've tested both the server and web SDKs based on this change locally in the js-contribs by running the e2e test suite.
Relates to: #616