diff --git a/.gitignore b/.gitignore index da397574..910f6339 100644 --- a/.gitignore +++ b/.gitignore @@ -1,44 +1,8 @@ -docs -yarn.lock -**/node_modules/ -**/*.log -test/repo-tests* -**/bundle.js -package-lock.json -tsconfig-types.aegir.json - -# Logs -logs -*.log - -coverage -.coverage -*.lcov - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -build - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules - -lib +build dist -types +.docs +.coverage +node_modules +package-lock.json +yarn.lock diff --git a/README.md b/README.md index 1fab63b7..be9ec3e4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![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) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs-unixfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs-unixfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JS implementation of the IPFS UnixFS @@ -14,9 +14,9 @@ - [Development](#development) - [Publishing new versions](#publishing-new-versions) - [Using prerelease versions](#using-prerelease-versions) -- [Contribute](#contribute) +- [API Docs](#api-docs) - [License](#license) -- [Contribute](#contribute-1) +- [Contribute](#contribute) ## Structure @@ -56,13 +56,9 @@ Any changed packages from each successful build of master are published to npm a Canary builds only consider changes to packages in the last built commit so changes to the root config files should not result in new prereleases being published to npm. -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). +## API Docs -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) +- ## License diff --git a/lerna.json b/lerna.json deleted file mode 100644 index b8a9e8e2..00000000 --- a/lerna.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "lerna": "6.0.1", - "useWorkspaces": true, - "version": "independent", - "command": { - "run": { - "stream": true - } - } -} diff --git a/package.json b/package.json index ac754dd0..4d486dbd 100644 --- a/package.json +++ b/package.json @@ -17,23 +17,25 @@ }, "private": true, "scripts": { - "reset": "lerna run clean && rimraf ./node_modules ./package-lock.json packages/*/node_modules packages/*/package-lock.json", - "test": "lerna run --concurrency 1 test -- --", - "test:node": "lerna run --concurrency 1 test:node -- --", - "test:chrome": "lerna run --concurrency 1 test:chrome -- --", - "test:chrome-webworker": "lerna --concurrency 1 run test:chrome-webworker -- --", - "test:firefox": "lerna run --concurrency 1 test:firefox -- --", - "test:firefox-webworker": "lerna run --concurrency 1 test:firefox-webworker -- --", - "test:electron-main": "lerna run --concurrency 1 test:electron-main -- --", - "test:electron-renderer": "lerna run --concurrency 1 test:electron-renderer -- --", - "clean": "lerna run clean", - "build": "lerna run build", - "lint": "lerna run lint", - "dep-check": "lerna run dep-check", - "release": "lerna exec --concurrency 1 -- semantic-release -e semantic-release-monorepo" + "reset": "aegir run clean && aegir clean ./node_modules ./package-lock.json packages/*/node_modules packages/*/package-lock.json", + "test": "aegir run test", + "test:node": "aegir run test:node", + "test:chrome": "aegir run test:chrome", + "test:chrome-webworker": "aegir run test:chrome-webworker", + "test:firefox": "aegir run test:firefox", + "test:firefox-webworker": "aegir run test:firefox-webworker", + "test:electron-main": "aegir run test:electron-main", + "test:electron-renderer": "aegir run test:electron-renderer", + "clean": "aegir run clean", + "build": "aegir run build", + "lint": "aegir run lint", + "docs": "NODE_OPTIONS=--max_old_space_size=4096 aegir docs", + "docs:no-publish": "npm run docs -- --publish false", + "dep-check": "aegir run dep-check", + "release": "npm run docs:no-publish && aegir run release && npm run docs" }, "dependencies": { - "lerna": "^6.0.1" + "aegir": "^37.9.0" }, "workspaces": [ "packages/*" diff --git a/packages/ipfs-unixfs-exporter/README.md b/packages/ipfs-unixfs-exporter/README.md index b1ef3d59..66655aa0 100644 --- a/packages/ipfs-unixfs-exporter/README.md +++ b/packages/ipfs-unixfs-exporter/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![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) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs-unixfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs-unixfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the UnixFs exporter used by IPFS @@ -20,9 +20,9 @@ - [`entry.content({ offset, length })`](#entrycontent-offset-length-) - [`walkPath(cid, blockstore)`](#walkpathcid-blockstore) - [`recursive(cid, blockstore)`](#recursivecid-blockstore) -- [Contribute](#contribute) +- [API Docs](#api-docs) - [License](#license) -- [Contribute](#contribute-1) +- [Contribute](#contribute) ## Install @@ -236,13 +236,9 @@ for await (const child of recursive('Qmfoo/foo/bar', blockstore)) { // entries contains all children of the `Qmfoo/foo/bar` directory and it's children ``` -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-exporter/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). +## API Docs -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) +- ## License diff --git a/packages/ipfs-unixfs-exporter/package.json b/packages/ipfs-unixfs-exporter/package.json index 2c03a63e..9ac3c2a7 100644 --- a/packages/ipfs-unixfs-exporter/package.json +++ b/packages/ipfs-unixfs-exporter/package.json @@ -151,19 +151,19 @@ "release": "aegir release" }, "dependencies": { - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-pb": "^3.0.0", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-pb": "^4.0.0", "@multiformats/murmur3": "^2.0.0", "err-code": "^3.0.1", "hamt-sharding": "^3.0.0", - "interface-blockstore": "^3.0.0", + "interface-blockstore": "^4.0.0", "ipfs-unixfs": "^8.0.0", "it-last": "^2.0.0", "it-map": "^2.0.0", "it-parallel": "^3.0.0", "it-pipe": "^2.0.4", "it-pushable": "^3.1.0", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "p-queue": "^7.3.0", "uint8arrays": "^4.0.2" }, @@ -171,7 +171,7 @@ "@types/sinon": "^10.0.0", "abort-controller": "^3.0.0", "aegir": "^37.5.0", - "blockstore-core": "^2.0.1", + "blockstore-core": "^3.0.0", "crypto-browserify": "^3.12.0", "delay": "^5.0.0", "ipfs-unixfs-importer": "^11.0.0", @@ -184,5 +184,8 @@ }, "browser": { "fs": false + }, + "typedoc": { + "entryPoint": "./src/index.js" } } diff --git a/packages/ipfs-unixfs-importer/README.md b/packages/ipfs-unixfs-importer/README.md index 3c914fc6..af5fa500 100644 --- a/packages/ipfs-unixfs-importer/README.md +++ b/packages/ipfs-unixfs-importer/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![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) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs-unixfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs-unixfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the UnixFs importer used by IPFS @@ -15,9 +15,9 @@ - [API](#api) - [const stream = importer(source, blockstore \[, options\])](#const-stream--importersource-blockstore--options) - [Overriding internals](#overriding-internals) -- [Contribute](#contribute) +- [API Docs](#api-docs) - [License](#license) -- [Contribute](#contribute-1) +- [Contribute](#contribute) ## Install @@ -167,13 +167,9 @@ Several aspects of the importer are overridable by specifying functions as part - This function should read `{ cid, path, unixfs, node }` entries from `source` and place them in a directory structure - It should yield an object with the properties `{ cid, path, unixfs, size }` where `cid` is a `CID`, `path` is a string, `unixfs` is a UnixFS entry and `size` is a `Number`. -## 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). +## API Docs -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) +- ## License diff --git a/packages/ipfs-unixfs-importer/package.json b/packages/ipfs-unixfs-importer/package.json index 3a0649d1..90c29879 100644 --- a/packages/ipfs-unixfs-importer/package.json +++ b/packages/ipfs-unixfs-importer/package.json @@ -151,18 +151,18 @@ "release": "aegir release" }, "dependencies": { - "@ipld/dag-pb": "^3.0.0", + "@ipld/dag-pb": "^4.0.0", "@multiformats/murmur3": "^2.0.0", "err-code": "^3.0.1", "hamt-sharding": "^3.0.0", - "interface-blockstore": "^3.0.0", + "interface-blockstore": "^4.0.0", "ipfs-unixfs": "^8.0.0", "it-all": "^2.0.0", "it-batch": "^2.0.0", "it-first": "^2.0.0", "it-parallel-batch": "^2.0.0", "merge-options": "^3.0.4", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "rabin-wasm": "^0.1.4", "uint8arraylist": "^2.3.3", "uint8arrays": "^4.0.2" @@ -170,11 +170,14 @@ "devDependencies": { "aegir": "^37.5.0", "assert": "^2.0.0", - "blockstore-core": "^2.0.1", + "blockstore-core": "^3.0.0", "it-buffer-stream": "^3.0.0", "wherearewe": "^2.0.1" }, "browser": { "fs": false + }, + "typedoc": { + "entryPoint": "./src/index.js" } } diff --git a/packages/ipfs-unixfs/README.md b/packages/ipfs-unixfs/README.md index aff89d89..aa5b963f 100644 --- a/packages/ipfs-unixfs/README.md +++ b/packages/ipfs-unixfs/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![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) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs-unixfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs-unixfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of IPFS' unixfs (a Unix FileSystem representation on top of a MerkleDAG) @@ -24,9 +24,9 @@ - [marshal and unmarshal](#marshal-and-unmarshal) - [is this UnixFS entry a directory?](#is-this-unixfs-entry-a-directory) - [has an mtime been set?](#has-an-mtime-been-set) -- [Contribute](#contribute) +- [API Docs](#api-docs) - [License](#license) -- [Contribute](#contribute-1) +- [Contribute](#contribute) ## Install @@ -181,13 +181,9 @@ const dir = new Data({ type: 'dir', mtime: new Date() }) dir.mtime // { secs: Number, nsecs: Number } ``` -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). +## API Docs -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) +- ## License diff --git a/packages/ipfs-unixfs/package.json b/packages/ipfs-unixfs/package.json index 12387e46..0f7714c5 100644 --- a/packages/ipfs-unixfs/package.json +++ b/packages/ipfs-unixfs/package.json @@ -167,5 +167,8 @@ }, "browser": { "fs": false + }, + "typedoc": { + "entryPoint": "./src/index.js" } }