Skip to content

Commit bda3717

Browse files
committed
chore: update package.json scripts and readmes
1 parent 37d96ee commit bda3717

File tree

11 files changed

+125
-127
lines changed

11 files changed

+125
-127
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ stages:
44
- check
55
- test
66
- cov
7+
- release
78

89
node_js:
910
- '12'
@@ -53,5 +54,9 @@ jobs:
5354
firefox: latest
5455
script: npm run test:webworker -- -- -- --browsers FirefoxHeadless
5556

57+
- stage: release
58+
name: release rc
59+
script: npm run release:rc -- --yes
60+
5661
notifications:
5762
email: false

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 David Dias
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

+28-17
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,43 @@ The UnixFS spec can be found at [ipfs/specs/UNIXFS.md](https://github.com/ipfs/s
1717

1818
## Table of Contents <!-- omit in toc -->
1919

20-
- [Install](#install)
21-
- [npm](#npm)
22-
- [Use in Node.js](#use-in-nodejs)
23-
- [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)
24-
- [Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag)
25-
- [Usage](#usage)
26-
- [Examples](#examples)
27-
- [Create a file composed by several blocks](#create-a-file-composed-by-several-blocks)
28-
- [Create a directory that contains several files](#create-a-directory-that-contains-several-files)
29-
- [API](#api)
30-
- [UnixFS Data Structure](#unixfs-data-structure)
31-
- [create an unixfs Data element](#create-an-unixfs-data-element)
32-
- [add and remove a block size to the block size list](#add-and-remove-a-block-size-to-the-block-size-list)
33-
- [get total fileSize](#get-total-filesize)
34-
- [marshal and unmarshal](#marshal-and-unmarshal)
35-
- [is this UnixFS entry a directory?](#is-this-unixfs-entry-a-directory)
36-
- [has an mtime been set?](#has-an-mtime-been-set)
20+
- [Structure](#structure)
21+
- [Development](#development)
22+
- [Publishing new versions](#publishing-new-versions)
23+
- [Publishing release candidates](#publishing-release-candidates)
3724
- [Contribute](#contribute)
3825
- [License](#license)
3926

4027
## Structure
4128

29+
This project is broken into several modules, their purposes are:
30+
4231
* `/packages/ipfs-unixfs` Serialization/deserialization of UnixFS objects to protocol buffers
4332
* `/packages/ipfs-unixfs-importer` Builds DAGs from files and directories
4433
* `/packages/ipfs-unixfs-exporter` Exports DAGs
4534

35+
## Development
36+
37+
1. Clone this repo
38+
2. Run `npm install`
39+
40+
This will install lerna and bootstrap the various packages, dedpuing and hoisting dependencies into the root folder.
41+
42+
If later you wish to remove all the `node_modules`/`dist` folders and start again, run `npm reset && npm install` from the root.
43+
44+
See the scripts section of the root [`package.json`](./package.json) for more commands.
45+
46+
### Publishing new versions
47+
48+
1. Ensure you have a `GH_TOKEN` env var containing a GitHub [Personal Access Token](https://github.com/settings/tokens) with `public_repo` permissions
49+
2. From the root of this repo run `npm run release` and follow the on screen prompts. It will use [conventional commits](https://www.conventionalcommits.org) to work out the new package version
50+
51+
### Publishing release candidates
52+
53+
To publish a release candidate use `npm run release:rc`. This will result in version numbers similar to `0.4.4-rc.0+8d4b747` published under the npm tag `next`.
54+
55+
To update an rc, run `npm run release:rc` again.
56+
4657
## Contribute
4758

4859
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs/issues)!

lerna.json

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
},
1111
"run": {
1212
"stream": true
13+
},
14+
"publish": {
15+
"message": "chore: publish",
16+
"conventionalCommits": true,
17+
"createRelease": "github"
1318
}
1419
}
1520
}

package.json

+32-5
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,48 @@
44
"description": "JS implementation of the IPFS UnixFS",
55
"scripts": {
66
"postinstall": "lerna bootstrap",
7-
"reset": "lerna run --parallel clean && rm -rf packages/*/node_modules packages/*/package-lock.json node_modules",
7+
"reset": "lerna run --parallel clean && rm -rf packages/*/node_modules node_modules",
88
"test": "lerna run --parallel test",
99
"test:node": "lerna run --parallel test:node",
1010
"test:browser": "lerna run --parallel test:browser",
1111
"test:webworker": "lerna run --parallel test:webworker",
1212
"coverage": "lerna run --parallel coverage",
1313
"build": "lerna run --parallel build",
14-
"deploy": "lerna run --parallel deploy",
15-
"start": "NODE_ENV=development lerna run --parallel start",
1614
"clean": "lerna run --parallel clean",
1715
"lint": "lerna run --parallel lint",
1816
"depcheck": "lerna run --parallel depcheck",
19-
"publish": "lerna publish"
17+
"release": "npm run update-contributors && lerna publish",
18+
"release:rc": "npm run update-contributors && lerna publish --canary --preid rc --dist-tag next",
19+
"update-contributors": "aegir release --lint=false --test=false --bump=false --build=false --changelog=false --commit=false --tag=false --push=false --ghrelease=false --docs=false --publish=false"
2020
},
2121
"devDependencies": {
2222
"lerna": "^3.20.2"
23-
}
23+
},
24+
"repository": {
25+
"type": "git",
26+
"url": "git+https://github.com/ipfs/js-ipfs-unixfs.git"
27+
},
28+
"private": true,
29+
"contributors": [
30+
"achingbrain <[email protected]>",
31+
"David Dias <[email protected]>",
32+
"Friedel Ziegelmayer <[email protected]>",
33+
"Stephen Whitmore <[email protected]>",
34+
"Alan Shaw <[email protected]>",
35+
"Pedro Teixeira <[email protected]>",
36+
"nginnever <[email protected]>",
37+
"Volker Mische <[email protected]>",
38+
"Dan Ordille <[email protected]>",
39+
"Richard Schneider <[email protected]>",
40+
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <[email protected]>",
41+
"Hugo Dias <[email protected]>",
42+
"JGAntunes <[email protected]>",
43+
"Marcin Rataj <[email protected]>",
44+
"Richard Littauer <[email protected]>",
45+
"Mithgol <[email protected]>",
46+
"Francisco Baio Dias <[email protected]>",
47+
"Diogo Silva <[email protected]>",
48+
"jbenet <[email protected]>",
49+
"Bernard Mordan <[email protected]>"
50+
]
2451
}

packages/ipfs-unixfs-exporter/README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
44
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
55
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
6-
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
7-
[![Build Status](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs-exporter)](https://travis-ci.com/ipfs/js-ipfs-unixfs-exporter)
8-
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs-exporter/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs-exporter)
9-
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-unixfs-exporter.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-exporter)
10-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
11-
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
12-
![](https://img.shields.io/badge/Node.js-%3E%3D8.0.0-orange.svg?style=flat-square)
6+
[![Build Status](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs)](https://travis-ci.com/ipfs/js-ipfs-unixfs)
7+
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)
138

14-
> JavaScript implementation of the exporter used by IPFS to handle Files
9+
> Exports UnixFS and other DAGs from IPFS
1510
1611
## Lead Maintainer
1712

@@ -30,7 +25,7 @@
3025
- [UnixFS V1 entries](#unixfs-v1-entries)
3126
- [Raw entries](#raw-entries)
3227
- [CBOR entries](#cbor-entries)
33-
- [`entry.content({ offset, length })`](#entrycontent-offset-length)
28+
- [`entry.content({ offset, length })`](#entrycontent-offset-length-)
3429
- [`exporter.path(cid, ipld)`](#exporterpathcid-ipld)
3530
- [`exporter.recursive(cid, ipld)`](#exporterrecursivecid-ipld)
3631
- [Contribute](#contribute)

packages/ipfs-unixfs-exporter/package.json

+9-32
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,39 @@
1313
"test:browser": "aegir test -t browser",
1414
"test:webworker": "aegir test -t webworker",
1515
"build": "aegir build",
16+
"clean": "rm -rf ./dist",
1617
"lint": "aegir lint",
17-
"prepublishOnly": "aegir release --test=false --lint=false --bump=false",
1818
"coverage": "nyc -s npm run test:node && nyc report --reporter=html",
1919
"depcheck": "aegir dep-check"
2020
},
2121
"repository": {
2222
"type": "git",
23-
"url": "git+https://github.com/ipfs/js-ipfs-unixfs-exporter.git"
23+
"url": "git+https://github.com/ipfs/js-ipfs-unixfs.git"
2424
},
2525
"keywords": [
2626
"IPFS"
2727
],
2828
"license": "MIT",
2929
"bugs": {
30-
"url": "https://github.com/ipfs/js-ipfs-unixfs-exporter/issues"
30+
"url": "https://github.com/ipfs/js-ipfs-unixfs/issues"
3131
},
3232
"engines": {
33-
"node": ">=8.0.0",
34-
"npm": ">=3.0.0"
33+
"node": ">=10.0.0",
34+
"npm": ">=4.0.0"
3535
},
36-
"homepage": "https://github.com/ipfs/js-ipfs-unixfs-exporter#readme",
36+
"homepage": "https://github.com/ipfs/js-ipfs-unixfs#readme",
3737
"devDependencies": {
38-
"aegir": "^21.0.2",
38+
"aegir": "^21.3.0",
3939
"async-iterator-all": "^1.0.0",
4040
"async-iterator-buffer-stream": "^1.0.0",
4141
"async-iterator-first": "^1.0.0",
4242
"chai": "^4.2.0",
4343
"detect-node": "^2.0.4",
4444
"dirty-chai": "^2.0.1",
45+
"ipfs-unixfs-importer": "^0.45.0",
4546
"ipld": "^0.25.0",
4647
"ipld-dag-pb": "^0.18.0",
4748
"ipld-in-memory": "^3.0.0",
48-
"ipfs-unixfs-importer": "^0.44.0",
4949
"multicodec": "^1.0.0",
5050
"nyc": "^15.0.0",
5151
"sinon": "^8.0.4"
@@ -57,28 +57,5 @@
5757
"ipfs-unixfs": "^0.3.0",
5858
"it-last": "^1.0.1",
5959
"multihashing-async": "^0.8.0"
60-
},
61-
"contributors": [
62-
"Alan Shaw <[email protected]>",
63-
"Alan Shaw <[email protected]>",
64-
"Arpit Agarwal <[email protected]>",
65-
"Bernard Mordan <[email protected]>",
66-
"Dan Ordille <[email protected]>",
67-
"David Dias <[email protected]>",
68-
"Diogo Silva <[email protected]>",
69-
"Francisco Baio Dias <[email protected]>",
70-
"Friedel Ziegelmayer <[email protected]>",
71-
"Greenkeeper <[email protected]>",
72-
"Marcin Rataj <[email protected]>",
73-
"Pedro Teixeira <[email protected]>",
74-
"Richard Littauer <[email protected]>",
75-
"Richard Schneider <[email protected]>",
76-
"Stephen Whitmore <[email protected]>",
77-
"Volker Mische <[email protected]>",
78-
"achingbrain <[email protected]>",
79-
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",
80-
"jbenet <[email protected]>",
81-
"nginnever <[email protected]>",
82-
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <[email protected]>"
83-
]
60+
}
8461
}

packages/ipfs-unixfs-importer/README.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
33
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
44
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
55
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
6-
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
7-
[![Build Status](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs-importer)](https://travis-ci.com/ipfs/js-ipfs-unixfs-importer)
8-
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs-importer/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs-importer)
9-
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-unixfs-importer.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-importer)
10-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
11-
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
12-
![](https://img.shields.io/badge/Node.js-%3E%3D8.0.0-orange.svg?style=flat-square)
6+
[![Build Status](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs)](https://travis-ci.com/ipfs/js-ipfs-unixfs)
7+
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)
138

149
> JavaScript implementation of the layout and chunking mechanisms used by IPFS to handle Files
1510
@@ -183,4 +178,4 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
183178

184179
## License
185180

186-
[MIT](LICENSE)
181+
[MIT](LICENSE)

packages/ipfs-unixfs-importer/package.json

+9-34
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,35 @@
1313
"test:browser": "aegir test -t browser",
1414
"test:webworker": "aegir test -t webworker",
1515
"build": "aegir build",
16+
"clean": "rm -rf ./dist",
1617
"lint": "aegir lint",
17-
"prepublishOnly": "aegir release --test=false --lint=false --bump=false",
1818
"coverage": "nyc -s npm run test:node && nyc report --reporter=html",
1919
"depcheck": "aegir dep-check"
2020
},
2121
"repository": {
2222
"type": "git",
23-
"url": "git+https://github.com/ipfs/js-ipfs-unixfs-importer.git"
23+
"url": "git+https://github.com/ipfs/js-ipfs-unixfs.git"
2424
},
2525
"keywords": [
2626
"IPFS"
2727
],
2828
"license": "MIT",
2929
"bugs": {
30-
"url": "https://github.com/ipfs/js-ipfs-unixfs-importer/issues"
30+
"url": "https://github.com/ipfs/js-ipfs-unixfs/issues"
3131
},
3232
"engines": {
33-
"node": ">=8.0.0",
34-
"npm": ">=3.0.0"
33+
"node": ">=10.0.0",
34+
"npm": ">=4.0.0"
3535
},
36-
"homepage": "https://github.com/ipfs/js-ipfs-unixfs-importer#readme",
36+
"homepage": "https://github.com/ipfs/js-ipfs-unixfs#readme",
3737
"devDependencies": {
38-
"aegir": "^21.0.2",
38+
"aegir": "^21.3.0",
3939
"chai": "^4.2.0",
4040
"cids": "^0.7.3",
4141
"deep-extend": "^0.6.0",
4242
"detect-node": "^2.0.4",
4343
"dirty-chai": "^2.0.1",
44-
"ipfs-unixfs-exporter": "^0.40.0",
44+
"ipfs-unixfs-exporter": "^0.41.1",
4545
"ipld": "^0.25.0",
4646
"ipld-in-memory": "^3.0.0",
4747
"it-buffer-stream": "^1.0.0",
@@ -63,30 +63,5 @@
6363
"multicodec": "^1.0.0",
6464
"multihashing-async": "^0.8.0",
6565
"rabin-wasm": "~0.0.8"
66-
},
67-
"contributors": [
68-
"Alan Shaw <[email protected]>",
69-
"Alan Shaw <[email protected]>",
70-
"Alex Potsides <[email protected]>",
71-
"Arpit Agarwal <[email protected]>",
72-
"Bernard Mordan <[email protected]>",
73-
"Dan Ordille <[email protected]>",
74-
"David Dias <[email protected]>",
75-
"Diogo Silva <[email protected]>",
76-
"Francisco Baio Dias <[email protected]>",
77-
"Friedel Ziegelmayer <[email protected]>",
78-
"Greenkeeper <[email protected]>",
79-
"Hugo Dias <[email protected]>",
80-
"Hugo Dias <[email protected]>",
81-
"Marcin Rataj <[email protected]>",
82-
"Pedro Teixeira <[email protected]>",
83-
"Richard Littauer <[email protected]>",
84-
"Richard Schneider <[email protected]>",
85-
"Stephen Whitmore <[email protected]>",
86-
"Volker Mische <[email protected]>",
87-
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",
88-
"jbenet <[email protected]>",
89-
"nginnever <[email protected]>",
90-
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <[email protected]>"
91-
]
66+
}
9267
}

packages/ipfs-unixfs/README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
44
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
55
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
6-
[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs)](https://travis-ci.com/ipfs/js-ipfs-unixfs)
6+
[![Build Status](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs)](https://travis-ci.com/ipfs/js-ipfs-unixfs)
77
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)
8-
[![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs)
9-
[![Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
10-
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
11-
![](https://img.shields.io/badge/Node.js-%3E%3D8.0.0-orange.svg?style=flat-square)
128

139
> JavaScript implementation of IPFS' UnixFS (a Unix FileSystem files representation on top of a MerkleDAG)
1410
@@ -208,3 +204,5 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
208204
## License
209205

210206
[MIT](LICENSE)
207+
208+
small change

0 commit comments

Comments
 (0)