bunqueue-client 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/queue-control.d.ts +2 -1
- package/dist/queue-control.js +3 -1
- package/package.json +1 -1
- package/src/queue-control.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to `bunqueue-client` (TypeScript SDK) are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.9] - 2026-07-14
|
|
9
|
+
|
|
10
|
+
Conformance-suite driven: the SDK is now certified by the cross-language
|
|
11
|
+
conformance kit (`sdk/conformance`, 17/17) against the formal wire spec
|
|
12
|
+
(`docs/protocol.md`).
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **`drain()` now returns the number of removed jobs** (was `void`,
|
|
17
|
+
silently discarding the wire `count` — the "discarded return value"
|
|
18
|
+
class the conformance suite checks for).
|
|
19
|
+
|
|
8
20
|
## [0.1.8] - 2026-07-14
|
|
9
21
|
|
|
10
22
|
Spec-alignment audit against the core protocol. Every fix ships with a repro
|
package/dist/queue-control.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export declare const controlMethods: {
|
|
|
9
9
|
pause(this: Ctx): Promise<void>;
|
|
10
10
|
resume(this: Ctx): Promise<void>;
|
|
11
11
|
isPaused(this: Ctx): Promise<boolean>;
|
|
12
|
-
|
|
12
|
+
/** Remove all waiting/delayed jobs; returns how many were dropped. */
|
|
13
|
+
drain(this: Ctx): Promise<number>;
|
|
13
14
|
obliterate(this: Ctx): Promise<void>;
|
|
14
15
|
/** Remove old jobs; returns how many were removed. */
|
|
15
16
|
clean(this: Ctx, graceMs: number, limit?: number, state?: JobStateName): Promise<number>;
|
package/dist/queue-control.js
CHANGED
|
@@ -15,8 +15,10 @@ export const controlMethods = {
|
|
|
15
15
|
async isPaused() {
|
|
16
16
|
return (await this.call({ cmd: 'IsPaused', queue: this.name })).paused === true;
|
|
17
17
|
},
|
|
18
|
+
/** Remove all waiting/delayed jobs; returns how many were dropped. */
|
|
18
19
|
async drain() {
|
|
19
|
-
await this.call({ cmd: 'Drain', queue: this.name });
|
|
20
|
+
const response = await this.call({ cmd: 'Drain', queue: this.name });
|
|
21
|
+
return response.count ?? 0;
|
|
20
22
|
},
|
|
21
23
|
async obliterate() {
|
|
22
24
|
await this.call({ cmd: 'Obliterate', queue: this.name });
|
package/package.json
CHANGED
package/src/queue-control.ts
CHANGED
|
@@ -25,8 +25,10 @@ export const controlMethods = {
|
|
|
25
25
|
return (await this.call<PausedResponse>({ cmd: 'IsPaused', queue: this.name })).paused === true;
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
/** Remove all waiting/delayed jobs; returns how many were dropped. */
|
|
29
|
+
async drain(this: Ctx): Promise<number> {
|
|
30
|
+
const response = await this.call<{ count?: number }>({ cmd: 'Drain', queue: this.name });
|
|
31
|
+
return response.count ?? 0;
|
|
30
32
|
},
|
|
31
33
|
|
|
32
34
|
async obliterate(this: Ctx): Promise<void> {
|