diff --git a/package.json b/package.json index dad0d62..433f8c5 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,9 @@ "license": "MIT", "dependencies": { "@vinerima/jetstream-types": "^2.0.0", - "@vinerima/wah": "2.0.1", + "@vinerima/wah": "2.1.0", "ioredis": "^5.10.1", + "ws": "^8.21.0", "zod": "^4.3.6" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a43168..33edc23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,11 +12,14 @@ importers: specifier: ^2.0.0 version: 2.0.0(zod@4.3.6) '@vinerima/wah': - specifier: 2.0.1 - version: 2.0.1(ws@8.20.0) + specifier: 2.1.0 + version: 2.1.0(ws@8.21.0) ioredis: specifier: ^5.10.1 version: 5.10.1 + ws: + specifier: ^8.21.0 + version: 8.21.0 zod: specifier: ^4.3.6 version: 4.3.6 @@ -70,8 +73,8 @@ packages: peerDependencies: zod: ^4.0.0 - '@vinerima/wah@2.0.1': - resolution: {integrity: sha512-O2+3GB1js7zQyhnSyyT+fvWFGRps38MWo6Vqpav8gyh+ilrzigQJTUtwKFRmmWYF80/p5itPwv5VynPoUNDk7A==} + '@vinerima/wah@2.1.0': + resolution: {integrity: sha512-SiaScZNqgFNwvagN2DEwGqiWB7i/EeMATm9L44T33JcX3PLRz5i3v0LUXohZnt7EGoxF1wOdvUM1UrXhcIvP8A==} engines: {node: '>=18.0.0'} peerDependencies: ws: ^8.19.0 @@ -167,8 +170,8 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - ws@8.20.0: - resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -219,11 +222,11 @@ snapshots: dependencies: zod: 4.3.6 - '@vinerima/wah@2.0.1(ws@8.20.0)': + '@vinerima/wah@2.1.0(ws@8.21.0)': dependencies: zod: 4.3.6 optionalDependencies: - ws: 8.20.0 + ws: 8.21.0 acorn-walk@8.3.5: dependencies: @@ -299,8 +302,7 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - ws@8.20.0: - optional: true + ws@8.21.0: {} yn@3.1.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..287b0f9 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +minimumReleaseAgeExclude: + - '@vinerima/wah@2.1.0' diff --git a/src/index.ts b/src/index.ts index 3d612e5..11a8bdb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -59,7 +59,7 @@ client.on("reconnecting", (info) => log("info", "Jetstream reconnecting", info)) client.on("close", () => { if (lastTimeUs > 0) { - client.setParams({ cursor: lastTimeUs }); + client.updateParams({ cursor: lastTimeUs }, { immediate: false }); log("info", `Cursor set to ${lastTimeUs} for reconnection`); } });