@platformatic/kafka 2.12.0 → 2.12.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.
@@ -58,13 +58,15 @@ export function decodeConsumerProtocolSubscription(buffer) {
58
58
  generationId: -1,
59
59
  rackId: null
60
60
  };
61
- if (version >= 1) {
61
+ // KafkaJS and Platformatic <= 2.11 may advertise newer versions with a v0 body.
62
+ // Default absent trailing fields, but still reject partially encoded fields.
63
+ if (version >= 1 && reader.remaining > 0) {
62
64
  subscription.ownedPartitions = readTopicPartitions(reader);
63
65
  }
64
- if (version >= 2) {
66
+ if (version >= 2 && reader.remaining > 0) {
65
67
  subscription.generationId = reader.readInt32();
66
68
  }
67
- if (version >= 3) {
69
+ if (version >= 3 && reader.remaining > 0) {
68
70
  subscription.rackId = reader.readNullableString(false);
69
71
  }
70
72
  return subscription;
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const name = "@platformatic/kafka";
2
- export const version = "2.12.0";
2
+ export const version = "2.12.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/kafka",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "Modern and performant client for Apache Kafka",
5
5
  "homepage": "https://github.com/platformatic/kafka",
6
6
  "author": "Platformatic Inc. <oss@platformatic.dev> (https://platformatic.dev)",
@@ -95,7 +95,7 @@
95
95
  "test": "c8 -c test/config/c8-local.json ./scripts/node --test --test-reporter=cleaner-spec-reporter 'test/*.test.ts' 'test/*/*.test.ts' 'test/*/*/*.test.ts'",
96
96
  "test:ci": "./scripts/node --test --experimental-test-coverage --test-coverage-include='src/**' --test-coverage-lines=90 --test-coverage-branches=90 --test-coverage-functions=90 --test-reporter=cleaner-spec-reporter 'test/*.test.ts' 'test/*/*.test.ts' 'test/*/*/*.test.ts'",
97
97
  "test:integrity": "./scripts/node --test --test-reporter=cleaner-spec-reporter 'regression/integrity/*.test.ts'",
98
- "test:performance": "./scripts/node --test --test-reporter=cleaner-spec-reporter 'regression/performance/*.test.ts'",
98
+ "test:performance": "./scripts/node --test --test-concurrency=1 --test-reporter=cleaner-spec-reporter 'regression/performance/*.test.ts'",
99
99
  "test:regression": "npm run test:integrity",
100
100
  "test:regression:all": "npm run test:integrity && npm run test:performance",
101
101
  "test:all": "npm test && npm run test:regression:all",