Skip to content

Conversation

beeme1mr
Copy link
Member

@beeme1mr beeme1mr commented Jun 6, 2025

This PR

  • adds support for hook data in accordance to the spec
  • adds optional type safety to the hook data keys and values

Related Issues

Fixes #1215

Notes

I had to add a bit more complexity in order to maintain support for existing hook implementations that used weakmaps.

How to test

Unit tests have been added

@beeme1mr beeme1mr requested review from a team as code owners June 6, 2025 00:33
@beeme1mr
Copy link
Member Author

beeme1mr commented Jun 9, 2025

I'm going to switch to a draft. I found a number of issues when I removed the weak map.

@beeme1mr beeme1mr marked this pull request as draft June 9, 2025 16:19
Signed-off-by: Michael Beemer <[email protected]>
Copy link
Member

@lukas-reining lukas-reining left a 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, left two questions :)

Copy link
Member

@lukas-reining lukas-reining left a comment

Choose a reason for hiding this comment

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

Looks good, left two minor suggestions.

@beeme1mr beeme1mr marked this pull request as ready for review June 13, 2025 18:31
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.

Approved with 2 nits.

Testing looks good by the way, I like the timing use-case inclusion.

@toddbaert
Copy link
Member

toddbaert commented Jul 8, 2025

@beeme1mr I guess one other question is, why go for an interface with custom methods for hook data, as opposed to a very simple "Record-based" type, more similar to what we did with EvaluationContext? They have similar spec descriptions, so I'd think we'd use similar language constructs for them.

@beeme1mr beeme1mr merged commit 07af3a9 into main Jul 18, 2025
7 of 10 checks passed
@beeme1mr beeme1mr deleted the add-hook-data branch July 18, 2025 19:08
weyert pushed a commit that referenced this pull request Jul 20, 2025
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Weyert de Boer <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Aug 12, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.9.0](core-v1.8.1...core-v1.9.0)
(2025-08-10)


### ✨ New Features

* add evaluation-scoped hook data
([#1216](#1216))
([07af3a9](07af3a9))
* support Angular 20
([#1220](#1220))
([aa232a9](aa232a9))

---
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]>
lukas-reining pushed a commit that referenced this pull request Aug 12, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.6.0](web-sdk-v1.5.0...web-sdk-v1.6.0)
(2025-08-12)


### ✨ New Features

* add evaluation-scoped hook data
([#1216](#1216))
([07af3a9](07af3a9))
* **web-global-build:** publish web packages to unpkg and jsdelivr
([#1225](#1225))
([40a512e](40a512e))


### 📚 Documentation

* Clarify the behavior of setProviderAndWait
([#1180](#1180))
([4fe8d87](4fe8d87))

---
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 Aug 14, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.19.0](server-sdk-v1.18.0...server-sdk-v1.19.0)
(2025-08-14)


### ✨ New Features

* add evaluation-scoped hook data
([#1216](#1216))
([07af3a9](07af3a9))


### 🐛 Bug Fixes

* update core dep
([#1228](#1228))
([845d24c](845d24c))


### 🧹 Chore

* update node to v20+
([#1203](#1203))
([1f33453](1f33453))


### 📚 Documentation

* Clarify the behavior of setProviderAndWait
([#1180](#1180))
([4fe8d87](4fe8d87))

---
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.

Add Hook Data Support
5 participants