kafka-ts 1.0.0 → 1.0.1

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.
@@ -45,10 +45,7 @@ class FetchManager {
45
45
  }
46
46
  async stop() {
47
47
  this.isRunning = false;
48
- const stopPromise = Promise.all([
49
- ...this.fetchers.map((fetcher) => fetcher.stop()),
50
- this.processor.stop(),
51
- ]);
48
+ const stopPromise = Promise.all([...this.fetchers.map((fetcher) => fetcher.stop()), this.processor.stop()]);
52
49
  this.pollCallback?.();
53
50
  Object.values(this.fetcherCallbacks).forEach((callback) => callback());
54
51
  this.fetcherCallbacks = {};
@@ -60,7 +57,7 @@ class FetchManager {
60
57
  }
61
58
  const { consumerGroup, batchSize } = this.options;
62
59
  consumerGroup?.handleLastHeartbeat();
63
- const batch = this.queue.splice(0, batchSize ?? undefined);
60
+ const batch = batchSize ? this.queue.splice(0, batchSize) : this.queue.splice(0);
64
61
  if (!batch.length) {
65
62
  await new Promise((resolve) => (this.pollCallback = resolve));
66
63
  return this.poll();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kafka-ts",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.js",
5
5
  "author": "Priit Käärd",
6
6
  "license": "MIT",