ipfs-utils
Advanced tools
Comparing version 2.3.1 to 2.4.0
@@ -0,1 +1,12 @@ | ||
<a name="2.4.0"></a> | ||
# [2.4.0](https://github.com/ipfs/js-ipfs-utils/compare/v2.3.1...v2.4.0) (2020-08-12) | ||
### Features | ||
* detect support for WebRTC data channels ([#56](https://github.com/ipfs/js-ipfs-utils/issues/56)) ([78ad2d2](https://github.com/ipfs/js-ipfs-utils/commit/78ad2d2)), closes [#50](https://github.com/ipfs/js-ipfs-utils/issues/50) | ||
* http upload/download progress handlers ([#54](https://github.com/ipfs/js-ipfs-utils/issues/54)) ([d30be96](https://github.com/ipfs/js-ipfs-utils/commit/d30be96)), closes [#52](https://github.com/ipfs/js-ipfs-utils/issues/52) [#52](https://github.com/ipfs/js-ipfs-utils/issues/52) | ||
<a name="2.3.1"></a> | ||
@@ -2,0 +13,0 @@ ## [2.3.1](https://github.com/ipfs/js-ipfs-utils/compare/v2.3.0...v2.3.1) (2020-06-18) |
{ | ||
"name": "ipfs-utils", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "Package to aggregate shared logic and dependencies for the IPFS ecosystem", | ||
@@ -15,7 +15,8 @@ "main": "src/index.js", | ||
"browser": { | ||
"fs-extra": false, | ||
"./src/http/fetch.js": "./src/http/fetch.browser.js", | ||
"./src/text-encoder.js": "./src/text-encoder.browser.js", | ||
"./src/text-decoder.js": "./src/text-decoder.browser.js", | ||
"./src/temp-dir.js": "./src/temp-dir.browser.js", | ||
"./src/path-join.js": "./src/path-join.browser.js" | ||
"./src/path-join.js": "./src/path-join.browser.js", | ||
"./test/files/glob-source.spec.js": false | ||
}, | ||
@@ -48,11 +49,11 @@ "repository": "github:ipfs/js-ipfs-utils", | ||
"node-fetch": "^2.6.0", | ||
"stream-to-it": "^0.2.0" | ||
"stream-to-it": "^0.2.0", | ||
"it-to-stream": "^0.1.2" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^22.0.0", | ||
"aegir": "^25.0.0", | ||
"delay": "^4.3.0", | ||
"it-all": "^1.0.2", | ||
"it-drain": "^1.0.1", | ||
"it-last": "^1.0.2", | ||
"it-to-stream": "^0.1.1" | ||
"it-last": "^1.0.2" | ||
}, | ||
@@ -64,6 +65,6 @@ "contributors": [ | ||
"Hector Sanjuan <code@hector.link>", | ||
"bluelovers <codelovers@users.sourceforge.net>", | ||
"Irakli Gozalishvili <contact@gozala.io>", | ||
"Marcin Rataj <lidel@lidel.org>" | ||
"Marcin Rataj <lidel@lidel.org>", | ||
"bluelovers <codelovers@users.sourceforge.net>" | ||
] | ||
} |
/* eslint-disable no-undef */ | ||
'use strict' | ||
const fetch = require('node-fetch') | ||
const { fetch, Request, Headers } = require('./http/fetch') | ||
const { TimeoutError, HTTPError } = require('./http/error') | ||
const merge = require('merge-options').bind({ ignoreUndefined: true }) | ||
@@ -11,20 +12,2 @@ const { URL, URLSearchParams } = require('iso-url') | ||
const Request = fetch.Request | ||
const Headers = fetch.Headers | ||
class TimeoutError extends Error { | ||
constructor () { | ||
super('Request timed out') | ||
this.name = 'TimeoutError' | ||
} | ||
} | ||
class HTTPError extends Error { | ||
constructor (response) { | ||
super(response.statusText) | ||
this.name = 'HTTPError' | ||
this.response = response | ||
} | ||
} | ||
const timeout = (promise, ms, abortController) => { | ||
@@ -91,2 +74,4 @@ if (ms === undefined) { | ||
* @prop {function(Response): Promise<void>} [handleError] - Handle errors | ||
* @prop {function({total:number, loaded:number, lengthComputable:boolean}):void} [onUploadProgress] - Can be passed to track upload progress | ||
* @prop {function({total:number, loaded:number, lengthComputable:boolean}):void} [onDownloadProgress] - Can be passed to track download progress | ||
*/ | ||
@@ -93,0 +78,0 @@ |
@@ -8,3 +8,4 @@ 'use strict' | ||
supportsWebRTC: 'RTCPeerConnection' in globalThis && | ||
(typeof navigator !== 'undefined' && typeof navigator.mediaDevices !== 'undefined' && 'getUserMedia' in navigator.mediaDevices) | ||
(typeof navigator !== 'undefined' && typeof navigator.mediaDevices !== 'undefined' && 'getUserMedia' in navigator.mediaDevices), | ||
supportsWebRTCDataChannels: 'RTCPeerConnection' in globalThis | ||
} |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
58807
5
28
1104
13
5
+ Addedit-to-stream@^0.1.2
+ Addedfast-fifo@1.3.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedit-to-stream@0.1.2(transitive)
+ Addedp-defer@3.0.0(transitive)
+ Addedp-fifo@1.0.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)