Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-range-fetcher

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-range-fetcher - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

25

dist/httpRangeFetcher.js

@@ -22,4 +22,23 @@ "use strict";

var crossFetchBinaryRange = require('./crossFetchBinaryRange'); // TODO: fire events when a remote file is detected as having been changed
var crossFetchBinaryRange = require('./crossFetchBinaryRange');
/**
* check if the given exception was caused by an operation being intentionally aborted
* @param {Error} exception
* @returns {boolean}
*/
function isAbortException(exception) {
return (// DOMException
exception.name === 'AbortError' || // standard-ish non-DOM abort exception
// @ts-ignore
exception.code === 'ERR_ABORTED' || // message contains aborted for bubbling through RPC
// things we have seen that we want to catch here
// Error: aborted
// AbortError: aborted
// AbortError: The user aborted a request.
!!exception.message.match(/\b(aborted|AbortError)\b/i)
);
} // TODO: fire events when a remote file is detected as having been changed
/**

@@ -361,3 +380,3 @@ * smart cache that fetches chunks of remote files.

if (!(_context3.t0.name === 'AbortError')) {
if (!isAbortException(_context3.t0)) {
_context3.next = 15;

@@ -433,3 +452,3 @@ break;

if (!this.cacheSemantics.chunkIsCacheable(freshChunk)) {
this._uncacheIfSame(key, freshPromise);
this._uncacheIfSame(chunkKey, freshPromise);
}

@@ -436,0 +455,0 @@

2

package.json
{
"name": "http-range-fetcher",
"version": "1.2.1",
"version": "1.2.2",
"description": "caching, aggregating fetch manager for doing lots of HTTP range requests",

@@ -5,0 +5,0 @@ "license": "MIT",

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