@smithy/eventstream-codec 4.0.5 → 4.1.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.
package/dist-cjs/index.js CHANGED
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  EventStreamCodec: () => EventStreamCodec,
24
24
  HeaderMarshaller: () => HeaderMarshaller,
25
25
  Int64: () => Int64,
@@ -28,7 +28,7 @@ __export(src_exports, {
28
28
  SmithyMessageDecoderStream: () => SmithyMessageDecoderStream,
29
29
  SmithyMessageEncoderStream: () => SmithyMessageEncoderStream
30
30
  });
31
- module.exports = __toCommonJS(src_exports);
31
+ module.exports = __toCommonJS(index_exports);
32
32
 
33
33
  // src/EventStreamCodec.ts
34
34
  var import_crc322 = require("@aws-crypto/crc32");
@@ -82,8 +82,7 @@ function negate(bytes) {
82
82
  }
83
83
  for (let i = 7; i > -1; i--) {
84
84
  bytes[i]++;
85
- if (bytes[i] !== 0)
86
- break;
85
+ if (bytes[i] !== 0) break;
87
86
  }
88
87
  }
89
88
  __name(negate, "negate");
@@ -436,8 +435,7 @@ var SmithyMessageDecoderStream = class {
436
435
  async *asyncIterator() {
437
436
  for await (const message of this.options.messageStream) {
438
437
  const deserialized = await this.options.deserializer(message);
439
- if (deserialized === void 0)
440
- continue;
438
+ if (deserialized === void 0) continue;
441
439
  yield deserialized;
442
440
  }
443
441
  }
@@ -1,5 +1,5 @@
1
- import { AvailableMessage, AvailableMessages, Message, MessageDecoder, MessageEncoder, MessageHeaders } from "@smithy/types";
2
- import { Decoder, Encoder } from "@smithy/types";
1
+ import type { AvailableMessage, AvailableMessages, Message, MessageDecoder, MessageEncoder, MessageHeaders } from "@smithy/types";
2
+ import type { Decoder, Encoder } from "@smithy/types";
3
3
  /**
4
4
  * A Codec that can convert binary-packed event stream messages into
5
5
  * JavaScript objects and back again into their binary format.
@@ -1,4 +1,4 @@
1
- import { Decoder, Encoder, MessageHeaders } from "@smithy/types";
1
+ import type { Decoder, Encoder, MessageHeaders } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Int64 as IInt64 } from "@smithy/types";
1
+ import type { Int64 as IInt64 } from "@smithy/types";
2
2
  export interface Int64 extends IInt64 {
3
3
  }
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Int64 } from "./Int64";
1
+ import type { Int64 } from "./Int64";
2
2
  /**
3
3
  * An event stream message. The headers and body properties will always be
4
4
  * defined, with empty headers represented as an object with no keys and an
@@ -1,4 +1,4 @@
1
- import { Message, MessageDecoder } from "@smithy/types";
1
+ import type { Message, MessageDecoder } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Message, MessageEncoder } from "@smithy/types";
1
+ import type { Message, MessageEncoder } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Message } from "@smithy/types";
1
+ import type { Message } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Message } from "@smithy/types";
1
+ import type { Message } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
@@ -1,2 +1,2 @@
1
- import { TestVectors } from "./vectorTypes.fixture";
1
+ import type { TestVectors } from "./vectorTypes.fixture";
2
2
  export declare const vectors: TestVectors;
@@ -1,4 +1,4 @@
1
- import { Message } from "./Message";
1
+ import type { Message } from "./Message";
2
2
  export interface NegativeTestVector {
3
3
  expectation: "failure";
4
4
  encoded: Uint8Array;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/eventstream-codec",
3
- "version": "4.0.5",
3
+ "version": "4.1.1",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline eventstream-codec",
@@ -22,14 +22,15 @@
22
22
  "url": "https://aws.amazon.com/javascript/"
23
23
  },
24
24
  "license": "Apache-2.0",
25
+ "sideEffects": false,
25
26
  "dependencies": {
26
27
  "@aws-crypto/crc32": "5.2.0",
27
- "@smithy/types": "^4.3.2",
28
- "@smithy/util-hex-encoding": "^4.0.0",
28
+ "@smithy/types": "^4.5.0",
29
+ "@smithy/util-hex-encoding": "^4.1.0",
29
30
  "tslib": "^2.6.2"
30
31
  },
31
32
  "devDependencies": {
32
- "@smithy/util-utf8": "^4.0.0",
33
+ "@smithy/util-utf8": "^4.1.0",
33
34
  "@types/node": "^18.11.9",
34
35
  "concurrently": "7.0.0",
35
36
  "downlevel-dts": "0.10.1",