Skip to content

Commit d701898

Browse files
authored
Fix TDZ race condition in fetchEvent timeout handler (#368)
* fix: resolve TDZ race condition in fetchEvent timeout handler The timeout callback on line 1060 could fire before the subscription assignment on line 1065, causing a Temporal Dead Zone error when accessing 's.stop()'. This race condition was discovered when malformed nostr entities triggered the 10-second timeout. Changed s.stop() to s?.stop() to safely handle the case where the timeout fires before subscription assignment completes. * chore: bump to beta.63
1 parent fd157db commit d701898

File tree

24 files changed

+128
-150
lines changed

24 files changed

+128
-150
lines changed

blossom/example/react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@nostr-dev-kit/ndk": "3.0.0-beta.62",
13-
"@nostr-dev-kit/blossom": "8.0.0-beta.62",
14-
"@nostr-dev-kit/react": "1.3.13-beta.62",
12+
"@nostr-dev-kit/ndk": "3.0.0-beta.63",
13+
"@nostr-dev-kit/blossom": "8.0.0-beta.63",
14+
"@nostr-dev-kit/react": "1.3.13-beta.63",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0"
1717
},

blossom/example/svelte/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@nostr-dev-kit/blossom": "8.0.0-beta.62",
13-
"@nostr-dev-kit/ndk": "3.0.0-beta.62",
14-
"@nostr-dev-kit/sessions": "1.0.0-beta.62",
15-
"@nostr-dev-kit/svelte": "4.0.0-beta.62"
12+
"@nostr-dev-kit/blossom": "8.0.0-beta.63",
13+
"@nostr-dev-kit/ndk": "3.0.0-beta.63",
14+
"@nostr-dev-kit/sessions": "1.0.0-beta.63",
15+
"@nostr-dev-kit/svelte": "4.0.0-beta.63"
1616
},
1717
"devDependencies": {
1818
"@sveltejs/vite-plugin-svelte": "^6.2.1",

blossom/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nostr-dev-kit/blossom",
3-
"version": "8.0.0-beta.62",
3+
"version": "8.0.0-beta.63",
44
"description": "Blossom protocol support for NDK (Nostr Development Kit)",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
@@ -42,7 +42,7 @@
4242
"debug": "^4.3.7"
4343
},
4444
"peerDependencies": {
45-
"@nostr-dev-kit/ndk": "3.0.0-beta.62"
45+
"@nostr-dev-kit/ndk": "3.0.0-beta.63"
4646
},
4747
"devDependencies": {
4848
"@types/debug": "^4.1.12",

bun.lock

Lines changed: 49 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cache-browser/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nostr-dev-kit/cache-browser",
3-
"version": "1.0.0-beta.62",
3+
"version": "1.0.0-beta.63",
44
"description": "Browser-optimized NDK cache adapter with automatic WASM/IndexedDB fallback",
55
"license": "MIT",
66
"docs": "typedoc",
@@ -45,8 +45,8 @@
4545
"pablof7z"
4646
],
4747
"devDependencies": {
48-
"@nostr-dev-kit/cache-dexie": "2.7.8-beta.62",
49-
"@nostr-dev-kit/cache-sqlite-wasm": "1.0.0-beta.62",
48+
"@nostr-dev-kit/cache-dexie": "2.7.8-beta.63",
49+
"@nostr-dev-kit/cache-sqlite-wasm": "1.0.0-beta.63",
5050
"@types/debug": "^4.1.12",
5151
"@types/node": "^24.10.0",
5252
"fake-indexeddb": "^6.0.0",
@@ -62,8 +62,8 @@
6262
"typescript": "^5.9.3"
6363
},
6464
"peerDependencies": {
65-
"@nostr-dev-kit/cache-dexie": "2.7.8-beta.62",
66-
"@nostr-dev-kit/cache-sqlite-wasm": "1.0.0-beta.62",
67-
"@nostr-dev-kit/ndk": "3.0.0-beta.62"
65+
"@nostr-dev-kit/cache-dexie": "2.7.8-beta.63",
66+
"@nostr-dev-kit/cache-sqlite-wasm": "1.0.0-beta.63",
67+
"@nostr-dev-kit/ndk": "3.0.0-beta.63"
6868
}
6969
}

cache-dexie/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nostr-dev-kit/cache-dexie",
3-
"version": "2.7.8-beta.62",
3+
"version": "2.7.8-beta.63",
44
"description": "NDK Dexie Cache Adapter",
55
"license": "MIT",
66
"docs": "typedoc",
@@ -54,7 +54,7 @@
5454
"vitest": "^4.0.14"
5555
},
5656
"dependencies": {
57-
"@nostr-dev-kit/ndk": "3.0.0-beta.62",
57+
"@nostr-dev-kit/ndk": "3.0.0-beta.63",
5858
"debug": "^4.3.7",
5959
"dexie": "^4.0.8",
6060
"nostr-tools": "^2.17.2",

0 commit comments

Comments
 (0)