New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fetch-h2

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-h2 - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

4

dist/lib/fetch.js

@@ -177,3 +177,3 @@ "use strict";

}));
stream.on("streamClosed", guard((errorCode) => {
stream.on("close", guard(() => {
// We'll get an 'error' event if there actually is an

@@ -183,3 +183,3 @@ // error, but not if we got NGHTTP2_NO_ERROR.

// instead, to get (and propagate) the error object.
if (errorCode === NGHTTP2_NO_ERROR)
if (stream.rstCode === NGHTTP2_NO_ERROR)
reject(new core_1.AbortError("Stream prematurely closed"));

@@ -186,0 +186,0 @@ }));

@@ -1,1 +0,1 @@

export declare const version = "1.2.1";
export declare const version = "1.2.2";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "1.2.1";
exports.version = "1.2.2";
//# sourceMappingURL=version.js.map

@@ -423,2 +423,17 @@ "use strict";

});
describe("premature stream close", () => {
it("handle and reject fetch operation", async () => {
const { server, port } = await server_1.makeServer();
const url = `http://localhost:${port}/prem-close`;
try {
await __1.fetch(url);
chai_1.expect(false).to.equal(true);
}
catch (err) {
chai_1.expect(err.message).to.contain("Stream prematurely closed");
}
await __1.disconnectAll();
await server.shutdown();
});
});
//# sourceMappingURL=index.js.map

@@ -214,2 +214,5 @@ "use strict";

}
else if (path.startsWith("/prem-close")) {
stream.close();
}
else {

@@ -216,0 +219,0 @@ const matched = (this._opts.matchers || [])

{
"name": "fetch-h2",
"version": "1.2.1",
"version": "1.2.2",
"description": "HTTP/2-only Fetch API client for Node.js",

@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc