Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@smithy/util-stream

Package Overview
Dependencies
Maintainers
3
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/util-stream - npm Package Compare versions

Comparing version
4.5.12
to
4.5.13
+13
-2
dist-cjs/checksum/ChecksumStream.js

@@ -12,2 +12,3 @@ "use strict";

base64Encoder;
pendingCallback = null;
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {

@@ -27,7 +28,17 @@ super();

}
_read(size) { }
_read(size) {
if (this.pendingCallback) {
const callback = this.pendingCallback;
this.pendingCallback = null;
callback();
}
}
_write(chunk, encoding, callback) {
try {
this.checksum.update(chunk);
this.push(chunk);
const canPushMore = this.push(chunk);
if (!canPushMore) {
this.pendingCallback = callback;
return;
}
}

@@ -34,0 +45,0 @@ catch (e) {

@@ -9,2 +9,3 @@ import { toBase64 } from "@smithy/util-base64";

base64Encoder;
pendingCallback = null;
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {

@@ -24,7 +25,17 @@ super();

}
_read(size) { }
_read(size) {
if (this.pendingCallback) {
const callback = this.pendingCallback;
this.pendingCallback = null;
callback();
}
}
_write(chunk, encoding, callback) {
try {
this.checksum.update(chunk);
this.push(chunk);
const canPushMore = this.push(chunk);
if (!canPushMore) {
this.pendingCallback = callback;
return;
}
}

@@ -31,0 +42,0 @@ catch (e) {

@@ -41,2 +41,3 @@ import type { Checksum, Encoder } from "@smithy/types";

private base64Encoder;
private pendingCallback;
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }: ChecksumStreamInit<Readable>);

@@ -43,0 +44,0 @@ /**

@@ -41,2 +41,3 @@ import { Checksum, Encoder } from "@smithy/types";

private base64Encoder;
private pendingCallback;
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }: ChecksumStreamInit<Readable>);

@@ -43,0 +44,0 @@ /**

+1
-1
{
"name": "@smithy/util-stream",
"version": "4.5.12",
"version": "4.5.13",
"scripts": {

@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",