You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

ipfs-utils

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0 to 8.1.0

dist/src/fetch.rn.d.ts

9

CHANGELOG.md

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

# [8.1.0](https://github.com/ipfs/js-ipfs-utils/compare/v8.0.0...v8.1.0) (2021-05-21)
### Features
* add React Native android support ([#91](https://github.com/ipfs/js-ipfs-utils/issues/91)) ([b2b02a5](https://github.com/ipfs/js-ipfs-utils/commit/b2b02a5722f516b24813a54b3184c888935d31da))
# [8.0.0](https://github.com/ipfs/js-ipfs-utils/compare/v7.0.0...v8.0.0) (2021-05-10)

@@ -2,0 +11,0 @@

9

dist/src/env.d.ts
declare const IS_TEST: boolean;
declare const IS_ELECTRON: boolean;
declare const IS_ELECTRON_MAIN: boolean;
declare const IS_ELECTRON_RENDERER: boolean;
declare const IS_ELECTRON: any;
declare const IS_ELECTRON_MAIN: any;
declare const IS_ELECTRON_RENDERER: any;
declare const IS_NODE: boolean;

@@ -9,3 +9,4 @@ declare const IS_BROWSER: boolean;

declare const IS_ENV_WITH_DOM: boolean;
export { IS_TEST as isTest, IS_ELECTRON as isElectron, IS_ELECTRON_MAIN as isElectronMain, IS_ELECTRON_RENDERER as isElectronRenderer, IS_NODE as isNode, IS_BROWSER as isBrowser, IS_WEBWORKER as isWebWorker, IS_ENV_WITH_DOM as isEnvWithDom };
declare const IS_REACT_NATIVE: boolean;
export { IS_TEST as isTest, IS_ELECTRON as isElectron, IS_ELECTRON_MAIN as isElectronMain, IS_ELECTRON_RENDERER as isElectronRenderer, IS_NODE as isNode, IS_BROWSER as isBrowser, IS_WEBWORKER as isWebWorker, IS_ENV_WITH_DOM as isEnvWithDom, IS_REACT_NATIVE as isReactNative };
//# sourceMappingURL=env.d.ts.map

@@ -46,3 +46,3 @@ /// <reference types="node" />

declare namespace HTTP {
export { HTTPError, TimeoutError, fromStream as streamToAsyncIterator, post, get, put, _delete as delete, options, ExtendedResponse, NodeReadableStream, NodeDuplexStream, HTTPOptions };
export { HTTPError, TimeoutError, fromStream as streamToAsyncIterator, post, get, put, _delete as delete, options, NodeReadableStream, HTTPOptions, ExtendedResponse };
}

@@ -67,3 +67,2 @@ type HTTPOptions = import('./types').HTTPOptions;

type NodeReadableStream = import('stream').Readable;
type NodeDuplexStream = import('stream').Duplex;
//# sourceMappingURL=http.d.ts.map

@@ -11,2 +11,6 @@ interface ProgressStatus {

/**
* Extended body with support for node readable stream
*/
body?: BodyInit | null | NodeReadableStream
/**
* Amount of time until request should timeout in ms.

@@ -13,0 +17,0 @@ */

{
"name": "ipfs-utils",
"version": "8.0.0",
"version": "8.1.0",
"description": "Package to aggregate shared logic and dependencies for the IPFS ecosystem",

@@ -23,2 +23,6 @@ "main": "src/index.js",

},
"react-native": {
"./src/fetch.js": "./src/fetch.rn.js",
"./src/http/fetch.js": "./src/http/fetch.rn.js"
},
"types": "dist/src/index.d.ts",

@@ -40,2 +44,4 @@ "typesVersions": {

"test:electron-renderer": "aegir test -t electron-renderer",
"test:react-native:android": "aegir test -t react-native-android",
"test:react-native:ios": "aegir test -t react-native-ios",
"lint": "aegir lint",

@@ -55,3 +61,3 @@ "release": "aegir release --docs",

"is-electron": "^2.2.0",
"iso-url": "^1.0.0",
"iso-url": "^1.1.5",
"it-glob": "~0.0.11",

@@ -64,6 +70,7 @@ "it-to-stream": "^1.0.0",

"node-fetch": "^2.6.1",
"react-native-fetch-api": "^1.0.2",
"stream-to-it": "^0.2.2"
},
"devDependencies": {
"aegir": "^33.1.0",
"aegir": "^33.2.0",
"delay": "^5.0.0",

@@ -75,2 +82,3 @@ "events": "^3.3.0",

"it-last": "^1.0.4",
"react-native-polyfill-globals": "^3.0.0",
"readable-stream": "^3.6.0",

@@ -93,2 +101,3 @@ "uint8arrays": "^2.0.5",

"bluelovers <codelovers@users.sourceforge.net>",
"André Costa Lima <andreclima.pt@gmail.com>",
"Marcin Rataj <lidel@lidel.org>",

@@ -95,0 +104,0 @@ "Roderik van der Veer <roderik@settlemint.com>",

@@ -5,2 +5,3 @@ 'use strict'

const IS_ENV_WITH_DOM = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9
// @ts-ignore
const IS_ELECTRON = isElectron()

@@ -14,2 +15,3 @@ const IS_BROWSER = IS_ENV_WITH_DOM && !IS_ELECTRON

const IS_TEST = typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.NODE_ENV === 'test'
const IS_REACT_NATIVE = typeof navigator !== 'undefined' && navigator.product === 'ReactNative'

@@ -27,3 +29,4 @@ module.exports = {

isWebWorker: IS_WEBWORKER,
isEnvWithDom: IS_ENV_WITH_DOM
isEnvWithDom: IS_ENV_WITH_DOM,
isReactNative: IS_REACT_NATIVE
}

@@ -12,6 +12,5 @@ /* eslint-disable no-undef */

/**
* @typedef {import('./types').ExtendedResponse} ExtendedResponse
* @typedef {import('stream').Readable} NodeReadableStream
* @typedef {import('stream').Duplex} NodeDuplexStream
* @typedef {import('./types').HTTPOptions} HTTPOptions
* @typedef {import('./types').ExtendedResponse} ExtendedResponse
*/

@@ -18,0 +17,0 @@

'use strict'
// Electron has `XMLHttpRequest` and should get the browser implementation
// instead of node.
if (typeof XMLHttpRequest === 'function') {
// Electron has `XMLHttpRequest` and should get the browser implementation
// instead of node.
module.exports = require('./fetch.browser')

@@ -7,0 +7,0 @@ } else {

'use strict'
const { Request, Response, Headers, default: nativeFetch } = require('../fetch')

@@ -49,4 +48,3 @@ // @ts-ignore

/**
* @param {BodyInit} input
* @returns {Blob | FormData | URLSearchParams | ReadableStream<Uint8Array> | string | NodeReadableStream | Buffer}
* @param {BodyInit | NodeReadableStream} input
*/

@@ -53,0 +51,0 @@ const normalizeBody = (input) => {

'use strict'
module.exports = {
// in React Native: global === window === self
supportsFileReader: typeof self !== 'undefined' && 'FileReader' in self,

@@ -5,0 +6,0 @@ supportsWebRTC: 'RTCPeerConnection' in globalThis &&

@@ -11,2 +11,6 @@ interface ProgressStatus {

/**
* Extended body with support for node readable stream
*/
body?: BodyInit | null | NodeReadableStream
/**
* Amount of time until request should timeout in ms.

@@ -13,0 +17,0 @@ */

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc