http-range-fetcher
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -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 @@ |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39353
756
2