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

ipfs-unixfs

Package Overview
Dependencies
Maintainers
3
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-unixfs - npm Package Compare versions

Comparing version 3.0.1 to 4.0.0

dist/src/unixfs.d.ts

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

# [4.0.0](https://github.com/ipfs/js-ipfs-unixfs/compare/ipfs-unixfs@3.0.1...ipfs-unixfs@4.0.0) (2021-03-15)
### chore
* declare interface types in .d.ts file ([#122](https://github.com/ipfs/js-ipfs-unixfs/issues/122)) ([eaa8449](https://github.com/ipfs/js-ipfs-unixfs/commit/eaa8449c10abed9d9a378bee544b4ff501666c4b))
### BREAKING CHANGES
* switches to named exports
## [3.0.1](https://github.com/ipfs/js-ipfs-unixfs/compare/ipfs-unixfs@3.0.0...ipfs-unixfs@3.0.1) (2021-02-23)

@@ -8,0 +24,0 @@

35

dist/src/index.d.ts

@@ -1,2 +0,12 @@

export = Data;
export type Mtime = {
secs: number;
nsecs?: number | null | undefined;
};
export type MtimeLike = {
secs: number;
nsecs?: number | undefined;
} | {
Seconds: number;
FractionalNanoseconds?: number | undefined;
} | Mtime | [number, number] | Date | null | undefined;
declare class Data {

@@ -8,3 +18,3 @@ /**

*/
static unmarshal(marshaled: Uint8Array): import(".");
static unmarshal(marshaled: Uint8Array): Data;
/**

@@ -17,3 +27,3 @@ * @param {object} [options]

* @param {number} [options.fanout]
* @param {Mtime | Date | null} [options.mtime]
* @param {MtimeLike | null} [options.mtime]
* @param {number | string} [options.mode]

@@ -27,3 +37,3 @@ */

fanout?: number | undefined;
mtime?: Mtime | Date | null | undefined;
mtime?: MtimeLike | null;
mode?: string | number | undefined;

@@ -66,9 +76,12 @@ } | undefined);

}
declare namespace Data {
export { Mtime };
}
type Mtime = {
secs: number;
nsecs?: number | null | undefined;
};
/**
* @param {string | number | undefined} [mode]
*/
export function parseMode(mode?: string | number | undefined): number | undefined;
/**
* @param {MtimeLike} mtime
* @returns {Mtime | undefined}
*/
export function parseMtime(mtime: MtimeLike): Mtime | undefined;
export { Data as UnixFS };
//# sourceMappingURL=index.d.ts.map
{
"name": "ipfs-unixfs",
"version": "3.0.1",
"version": "4.0.0",
"description": "JavaScript implementation of IPFS' unixfs (a Unix FileSystem representation on top of a MerkleDAG)",

@@ -13,10 +13,10 @@ "leadMaintainer": "Alex Potsides <alex.potsides@protocol.ai>",

"prepare:proto": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/unixfs.js ./src/unixfs.proto",
"prepare:proto:types": "pbts -o src/unixfs.d.ts src/unixfs.js",
"prepare:proto-types": "pbts -o src/unixfs.d.ts src/unixfs.js",
"prepare:types": "aegir build --no-bundle",
"prepare:copy": "copy ./src/*.d.ts ./dist/src",
"test": "aegir test",
"build": "aegir build",
"clean": "rimraf ./dist",
"lint": "aegir lint",
"lint": "aegir ts --check && aegir lint",
"coverage": "nyc -s aegir test -t node && nyc report --reporter=html",
"depcheck": "aegir dep-check -i mkdirp -i @types/mocha -i nyc -i npm-run-all -i copy"
"depcheck": "aegir dep-check -i mkdirp -i @types/mocha -i nyc -i npm-run-all -i copy -i util"
},

@@ -41,3 +41,3 @@ "repository": {

"@types/mocha": "^8.2.1",
"aegir": "^30.3.0",
"aegir": "^32.0.0",
"copy": "^0.3.2",

@@ -47,3 +47,4 @@ "mkdirp": "^1.0.4",

"nyc": "^15.0.0",
"uint8arrays": "^2.1.2"
"uint8arrays": "^2.1.2",
"util": "^0.12.3"
},

@@ -62,3 +63,3 @@ "dependencies": {

},
"gitHead": "9a2b5f290205a9488f2d131a40965505db521bf0"
"gitHead": "172548bf5f5ecf2c6fd6f410be506ccd72804d28"
}

@@ -50,3 +50,3 @@ # ipfs-unixfs JavaScript Implementation <!-- omit in toc -->

```JavaScript
var UnixFS = require('ipfs-unixfs')
var { UnixFS } = require('ipfs-unixfs')
```

@@ -59,3 +59,3 @@

```JavaScript
var UnixFS = require('ipfs-unixfs')
var { UnixFS } = require('ipfs-unixfs')
```

@@ -62,0 +62,0 @@

@@ -14,2 +14,6 @@ 'use strict'

/**
* @typedef {null | undefined | { secs: number, nsecs?: number} | { Seconds: number, FractionalNanoseconds?: number} | Mtime | [number, number] | Date} MtimeLike
*/
const types = [

@@ -48,3 +52,3 @@ 'raw',

/**
* @param {null | undefined | { secs: number, nsecs?: number} | { Seconds: number, FractionalNanoseconds?: number} | Mtime | [number, number] | Date} mtime
* @param {MtimeLike} mtime
* @returns {Mtime | undefined}

@@ -166,3 +170,3 @@ */

* @param {number} [options.fanout]
* @param {Mtime | Date | null} [options.mtime]
* @param {MtimeLike | null} [options.mtime]
* @param {number | string} [options.mode]

@@ -334,2 +338,6 @@ */

module.exports = Data
module.exports = {
UnixFS: Data,
parseMode,
parseMtime
}

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