Skip to content

Commit 348db70

Browse files
typotterbertilhatt
andauthored
chore: upgrade common lib and set release v3.18.1 (#277)
* Fix LocalStorageAssignmentShim reading localStorage["undefined"] during construction Class field initializers for `size` and `[Symbol.toStringTag]` called `this.getCache()` before the constructor body assigned `this.localStorageKey`, causing `localStorage.getItem("undefined")`. If that key held non-JSON data, `JSON.parse` threw and the SDK failed to initialize. Convert both to getters so they no longer eagerly read localStorage during construction. This also fixes a secondary bug where `size` was a stale snapshot that never updated after mutations. FFESUPPORT-610 Made-with: Cursor * chore: bump version to 3.18.1 and use jest^29.x range, noting node 23 compat. * upgrade js-common * chore: commit latent docs changes --------- Co-authored-by: bertilhatt <bertil.hatt@datadoghq.com>
1 parent 19405ce commit 348db70

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

docs/js-client-sdk.loglevel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Valid log levels for the Eppo SDK logger.
99
**Signature:**
1010

1111
```typescript
12-
export declare type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent';
12+
export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent';
1313
```

js-client-sdk.api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
55
```ts
66

7-
/// <reference types="chrome" />
8-
97
import { AsyncMap } from '@eppo/js-client-sdk-common';
108
import { Attributes } from '@eppo/js-client-sdk-common';
119
import { AttributeType } from '@eppo/js-client-sdk-common';

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eppo/js-client-sdk",
3-
"version": "3.18.0",
3+
"version": "3.18.1",
44
"description": "Eppo SDK for client-side JavaScript applications",
55
"main": "dist/index.js",
66
"files": [
@@ -34,7 +34,7 @@
3434
"devDependencies": {
3535
"@microsoft/api-documenter": "^7.28.2",
3636
"@microsoft/api-extractor": "^7.48.1",
37-
"@types/jest": "^29.5.11",
37+
"@types/jest": "^29.5.14",
3838
"@types/spark-md5": "^3.0.5",
3939
"@typescript-eslint/eslint-plugin": "^5.13.0",
4040
"@typescript-eslint/parser": "^5.13.0",
@@ -59,10 +59,11 @@
5959
"webpack-cli": "^6.0.1"
6060
},
6161
"dependencies": {
62-
"@eppo/js-client-sdk-common": "4.15.3",
62+
"@eppo/js-client-sdk-common": "4.15.5",
6363
"@types/chrome": "^0.0.313",
6464
"lz-string": "^1.5.0"
6565
},
66+
"//jest": "jest 30+ drops Node 23 support; pinned to ^29.x until we drop Node 23 from CI",
6667
"resolutions": {
6768
"//": "CVE-2025-7783: form-data package has a vulnerability that can be exploited to execute arbitrary code; GHSA-mh29-5h37-fv8m: js-yaml security vulnerability",
6869
"form-data": "^4.0.4",

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@
402402
dependencies:
403403
tslib "^2.4.0"
404404

405-
"@eppo/js-client-sdk-common@4.15.3":
406-
version "4.15.3"
407-
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-4.15.3.tgz#70fa31a240b5b482d3f0d654b16ec946525c26d2"
408-
integrity sha512-boO/HetQAN5Qi+MAEzCetNteb+h5J4iC4qUcijaqlxLtWx2hUpAcAgRgUEQ4OpRtXSg3HjIgZWJzmhMj+zyYgg==
405+
"@eppo/js-client-sdk-common@4.15.5":
406+
version "4.15.5"
407+
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-4.15.5.tgz#6ca7bb4d27bc2ae63ab4a97e25b15ff61be2777c"
408+
integrity sha512-pRQG3fWiyOTAfjAvQ818aRMJryaDQXUNfcXzTy4czKFFBzPRTSUhaCDS1wGFU0zBLg2ZjMLBDt71km6q/wnztg==
409409
dependencies:
410410
buffer "npm:@eppo/buffer@6.2.0"
411411
js-base64 "^3.7.7"
@@ -1062,7 +1062,7 @@
10621062
dependencies:
10631063
"@types/istanbul-lib-report" "*"
10641064

1065-
"@types/jest@^29.5.11":
1065+
"@types/jest@^29.5.14":
10661066
version "29.5.14"
10671067
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5"
10681068
integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==

0 commit comments

Comments
 (0)