ipfs-unixfs-importer
Advanced tools
Comparing version 9.0.10 to 10.0.0
@@ -23,7 +23,15 @@ export default DirFlat; | ||
}; | ||
/** | ||
* @param {string} name | ||
*/ | ||
get(name: string): Promise<import("./types").InProgressImportResult | Dir>; | ||
childCount(): number; | ||
directChildrenCount(): number; | ||
onlyChild(): import("./types").InProgressImportResult | Dir; | ||
eachChildSeries(): AsyncGenerator<{ | ||
key: string; | ||
child: import("./types").InProgressImportResult | Dir; | ||
}, void, unknown>; | ||
} | ||
import Dir from "./dir.js"; | ||
//# sourceMappingURL=dir-flat.d.ts.map |
@@ -21,3 +21,7 @@ export default DirSharded; | ||
directChildrenCount(): number; | ||
onlyChild(): Bucket<import("./types").InProgressImportResult | Dir> | Bucket.BucketChild<import("./types").InProgressImportResult | Dir>; | ||
onlyChild(): Bucket<import("./types").InProgressImportResult | Dir> | import("hamt-sharding").BucketChild<import("./types").InProgressImportResult | Dir>; | ||
eachChildSeries(): AsyncGenerator<{ | ||
key: string; | ||
child: import("./types").InProgressImportResult | Dir; | ||
}, void, unknown>; | ||
} | ||
@@ -24,0 +28,0 @@ import Dir from "./dir.js"; |
@@ -17,3 +17,3 @@ export default Dir; | ||
mode?: number | undefined; | ||
mtime?: import("ipfs-unixfs/types/src/types").Mtime | undefined; | ||
mtime?: import("ipfs-unixfs/dist/src/types").Mtime | undefined; | ||
}; | ||
@@ -55,3 +55,3 @@ /** | ||
mode: number | undefined; | ||
mtime: import("ipfs-unixfs/types/src/types").Mtime | undefined; | ||
mtime: import("ipfs-unixfs/dist/src/types").Mtime | undefined; | ||
/** @type {CID | undefined} */ | ||
@@ -58,0 +58,0 @@ cid: CID | undefined; |
@@ -26,3 +26,3 @@ /** | ||
path: string | undefined; | ||
unixfs: import("ipfs-unixfs").UnixFS | undefined; | ||
unixfs: import("ipfs-unixfs/dist/src").UnixFS | undefined; | ||
size: number; | ||
@@ -29,0 +29,0 @@ }, void, unknown>; |
{ | ||
"name": "ipfs-unixfs-importer", | ||
"version": "9.0.10", | ||
"version": "10.0.0", | ||
"description": "JavaScript implementation of the UnixFs importer used by IPFS", | ||
@@ -21,14 +21,30 @@ "license": "Apache-2.0 OR MIT", | ||
}, | ||
"types": "types/src/index.d.ts", | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
], | ||
"src/*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"*", | ||
"!**/*.tsbuildinfo", | ||
"!**/browser-test", | ||
"!**/node-test" | ||
"src", | ||
"dist", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
], | ||
"exports": { | ||
".": { | ||
"browser": "./esm/src/index.js", | ||
"require": "./cjs/src/index.js", | ||
"import": "./esm/src/index.js" | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./src/index.js" | ||
} | ||
@@ -69,11 +85,11 @@ }, | ||
{ | ||
"type": "chore", | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "docs", | ||
"type": "test", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"type": "deps", | ||
"release": "patch" | ||
@@ -108,5 +124,9 @@ }, | ||
"type": "docs", | ||
"section": "Trivial Changes" | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "deps", | ||
"section": "Dependencies" | ||
}, | ||
{ | ||
"type": "test", | ||
@@ -120,8 +140,3 @@ "section": "Tests" | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"pkgRoot": "dist" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
@@ -132,4 +147,2 @@ "@semantic-release/git" | ||
"scripts": { | ||
"prepare": "aegir build --no-bundle && cp -R types dist", | ||
"pretest": "aegir build --esm-tests", | ||
"test": "aegir test", | ||
@@ -139,8 +152,7 @@ "test:node": "aegir test -t node --cov", | ||
"test:firefox": "aegir test -t browser -- --browser firefox", | ||
"build": "aegir build && cp -R types dist", | ||
"preleaseOnly": "npx json -I -f dist/package.json -e this.types='\"src/index.d.ts\"'", | ||
"clean": "rimraf ./dist ./types", | ||
"lint": "aegir ts -p check && aegir lint", | ||
"dep-check": "aegir dep-check -i rimraf -i copy -i util -i crypto-browserify -i events -i readable-stream -i assert -i interface-blockstore", | ||
"release": "semantic-release" | ||
"build": "aegir build", | ||
"clean": "aegir clean", | ||
"lint": "aegir lint", | ||
"dep-check": "aegir dep-check -i interface-blockstore", | ||
"release": "aegir release" | ||
}, | ||
@@ -152,3 +164,3 @@ "dependencies": { | ||
"err-code": "^3.0.1", | ||
"hamt-sharding": "^2.0.0", | ||
"hamt-sharding": "^3.0.0", | ||
"interface-blockstore": "^2.0.3", | ||
@@ -166,21 +178,11 @@ "ipfs-unixfs": "^6.0.0", | ||
"devDependencies": { | ||
"aegir": "^36.2.3", | ||
"aegir": "^37.5.0", | ||
"assert": "^2.0.0", | ||
"blockstore-core": "^1.0.5", | ||
"copy": "^0.3.2", | ||
"crypto-browserify": "^3.12.0", | ||
"events": "^3.3.0", | ||
"it-buffer-stream": "^2.0.0", | ||
"readable-stream": "^3.6.0", | ||
"rimraf": "^3.0.2", | ||
"util": "^0.12.3", | ||
"wherearewe": "^1.0.0" | ||
}, | ||
"browser": { | ||
".": "./cjs/src/index.js" | ||
}, | ||
"main": "./cjs/src/index.js", | ||
"publishConfig": { | ||
"directory": "dist" | ||
"fs": false | ||
} | ||
} |
# ipfs-unixfs-importer <!-- omit in toc --> | ||
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) | ||
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) | ||
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) | ||
[![Build Status](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs)](https://travis-ci.com/ipfs/js-ipfs-unixfs) | ||
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs) | ||
[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) | ||
[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) | ||
[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) | ||
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs-unixfs) | ||
[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs-unixfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs-unixfs/actions/workflows/js-test-and-release.yml) | ||
> JavaScript implementation of the layout and chunking mechanisms used by IPFS to handle Files | ||
> JavaScript implementation of the UnixFs importer used by IPFS | ||
## Lead Maintainer <!-- omit in toc --> | ||
## Table of contents <!-- omit in toc --> | ||
[Alex Potsides](https://github.com/achingbrain) | ||
## Table of Contents <!-- omit in toc --> | ||
- [Install](#install) | ||
- [Lead Maintainer <!-- omit in toc -->](#lead-maintainer----omit-in-toc---) | ||
- [Usage](#usage) | ||
- [Example](#example) | ||
- [API](#api) | ||
- [const stream = importer(source, blockstore [, options])](#const-stream--importersource-blockstore--options) | ||
- [const stream = importer(source, blockstore \[, options\])](#const-stream--importersource-blockstore--options) | ||
- [Overriding internals](#overriding-internals) | ||
- [Contribute](#contribute) | ||
- [License](#license) | ||
- [Contribute](#contribute-1) | ||
## Install | ||
```console | ||
$ npm i ipfs-unixfs-importer | ||
``` | ||
> npm install ipfs-unixfs-importer | ||
``` | ||
## Lead Maintainer <!-- omit in toc --> | ||
[Alex Potsides](https://github.com/achingbrain) | ||
## Usage | ||
@@ -99,3 +101,3 @@ | ||
#### const stream = importer(source, blockstore [, options]) | ||
#### const stream = importer(source, blockstore \[, options]) | ||
@@ -141,3 +143,3 @@ The `importer` function returns an async iterator takes a source async iterator that yields objects of the form: | ||
- `hashAlg` (string): multihash hashing algorithm to use | ||
- `cidVersion` (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, _including_ it's version) | ||
- `cidVersion` (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, *including* it's version) | ||
- `rawLeaves` (boolean, defaults to false): When a file would span multiple DAGNodes, if this is true the leaf nodes will not be wrapped in `UnixFS` protobufs and will instead contain the raw file bytes | ||
@@ -171,4 +173,7 @@ - `leafType` (string, defaults to `'file'`) what type of UnixFS node leaves should be - can be `'file'` or `'raw'` (ignored when `rawLeaves` is `true`) | ||
[blockstore]: https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-blockstore#readme | ||
[UnixFS]: https://github.com/ipfs/specs/tree/master/unixfs | ||
[IPLD]: https://github.com/ipld/js-ipld | ||
[CID]: https://github.com/multiformats/js-cid | ||
@@ -186,2 +191,13 @@ | ||
[MIT](LICENSE) | ||
Licensed under either of | ||
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>) | ||
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>) | ||
## Contribute | ||
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-importer/issues)! | ||
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). | ||
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) |
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
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
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
5
1
200
Yes
229096
64
2482
2
+ Addedhamt-sharding@3.0.6(transitive)
+ Addedmultiformats@13.3.1(transitive)
+ Addeduint8arrays@5.1.0(transitive)
- Removedhamt-sharding@2.0.1(transitive)
Updatedhamt-sharding@^3.0.0