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: Correctly handle null values in JSON variations. #569

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Sep 5, 2024

During the typescript implementation null values were removed during JSON de-serialization. This was over-zealous as variations can be JSON which contains null values.

This retains null value removal for everything aside from variations.

The reason this was originally done is to simplify all code which interacts with the data model (It only needs to check undefined versus null/undefined.). It also simplifies the ability to produce a compact representation that omits any null fields.

In the future we may want to consider removing this behavior.

Fixes #568

@kinyoklion kinyoklion marked this pull request as ready for review September 5, 2024 20:11
@kinyoklion kinyoklion requested a review from a team as a code owner September 5, 2024 20:11
@kinyoklion kinyoklion merged commit 907d08b into main Sep 5, 2024
23 checks passed
@kinyoklion kinyoklion deleted the rlamb/sc-255288/handle-null-values branch September 5, 2024 20:55
@github-actions github-actions bot mentioned this pull request Sep 5, 2024
kinyoklion added a commit that referenced this pull request Sep 5, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>akamai-edgeworker-sdk-common: 1.1.15</summary>

##
[1.1.15](akamai-edgeworker-sdk-common-v1.1.14...akamai-edgeworker-sdk-common-v1.1.15)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from ^2.6.0 to ^2.6.1
</details>

<details><summary>akamai-server-base-sdk: 2.1.15</summary>

##
[2.1.15](akamai-server-base-sdk-v2.1.14...akamai-server-base-sdk-v2.1.15)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.14 to
^1.1.15
    * @launchdarkly/js-server-sdk-common bumped from ^2.6.0 to ^2.6.1
</details>

<details><summary>akamai-server-edgekv-sdk: 1.1.15</summary>

##
[1.1.15](akamai-server-edgekv-sdk-v1.1.14...akamai-server-edgekv-sdk-v1.1.15)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.1.14 to
^1.1.15
    * @launchdarkly/js-server-sdk-common bumped from ^2.6.0 to ^2.6.1
</details>

<details><summary>cloudflare-server-sdk: 2.5.13</summary>

##
[2.5.13](cloudflare-server-sdk-v2.5.12...cloudflare-server-sdk-v2.5.13)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-server-sdk-common-edge bumped from 2.3.8 to 2.3.9
</details>

<details><summary>js-server-sdk-common: 2.6.1</summary>

##
[2.6.1](js-server-sdk-common-v2.6.0...js-server-sdk-common-v2.6.1)
(2024-09-05)


### Bug Fixes

* Correctly handle null values in JSON variations.
([#569](#569))
([907d08b](907d08b)),
closes [#568](#568)
</details>

<details><summary>js-server-sdk-common-edge: 2.3.9</summary>

##
[2.3.9](js-server-sdk-common-edge-v2.3.8...js-server-sdk-common-edge-v2.3.9)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.6.0 to 2.6.1
</details>

<details><summary>node-server-sdk: 9.5.4</summary>

##
[9.5.4](node-server-sdk-v9.5.3...node-server-sdk-v9.5.4)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.6.0 to 2.6.1
</details>

<details><summary>node-server-sdk-dynamodb: 6.1.21</summary>

##
[6.1.21](node-server-sdk-dynamodb-v6.1.20...node-server-sdk-dynamodb-v6.1.21)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.5.3 to 9.5.4
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.5.4
</details>

<details><summary>node-server-sdk-otel: 1.0.13</summary>

##
[1.0.13](node-server-sdk-otel-v1.0.12...node-server-sdk-otel-v1.0.13)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.5.3 to 9.5.4
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.5.4
</details>

<details><summary>node-server-sdk-redis: 4.1.21</summary>

##
[4.1.21](node-server-sdk-redis-v4.1.20...node-server-sdk-redis-v4.1.21)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.5.3 to 9.5.4
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.5.4
</details>

<details><summary>vercel-server-sdk: 1.3.16</summary>

##
[1.3.16](vercel-server-sdk-v1.3.15...vercel-server-sdk-v1.3.16)
(2024-09-05)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common-edge bumped from 2.3.8 to 2.3.9
</details>

---
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>
Co-authored-by: Ryan Lamb <[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.

Issue running with the example code from the node redis integration.
2 participants