Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Commit 852ce6b

Browse files
authored
feat: updates multihash table
- adds script to auto update - reduces bundle size by having only one explicit table ( 3kb gziped diff ) - remove defaultLengths seems to not be used and multicodec tables doesn't have it closes #73 BREAKING CHANGE: defaultLengths removed, skein is now lowercase
2 parents 532aff4 + 0e7152e commit 852ce6b

File tree

7 files changed

+344
-976
lines changed

7 files changed

+344
-976
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Protocol Labs Inc.
3+
Copyright (c) 2020 Protocol Labs Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ so give those a look as well.
1919

2020
## Lead Maintainer
2121

22-
[David Dias](http://github.com/diasdavid/)
22+
[Hugo Dias](http://github.com/hugomrdias/)
2323

2424
## Table of Contents
2525

@@ -84,6 +84,15 @@ You will need to use Node.js `Buffer` API compatible, if you are running inside
8484

8585
https://multiformats.github.io/js-multihash/
8686

87+
## Update Constants
88+
89+
To update the constants table run the command below. This will fetch the main codec list from https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv and filter only the multihash codecs and update the `constants.js` file in this repo.
90+
91+
```sh
92+
npm run update-constants
93+
```
94+
95+
8796
## Contribute
8897

8998
Contributions welcome. Please check out [the issues](https://github.com/multiformats/js-multihash/issues).
@@ -94,4 +103,4 @@ Small note: If editing the README, please conform to the [standard-readme](https
94103

95104
## License
96105

97-
[MIT](LICENSE) © 2016 Protocol Labs Inc.
106+
[MIT](LICENSE) © Protocol Labs Inc.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "multihashes",
33
"version": "0.4.19",
44
"description": "multihash implementation",
5-
"leadMaintainer": "David Dias <[email protected]>",
5+
"leadMaintainer": "Hugo Dias <[email protected]>",
66
"main": "src/index.js",
77
"scripts": {
88
"lint": "aegir lint",
@@ -15,7 +15,8 @@
1515
"release-minor": "aegir release --type minor --docs",
1616
"release-major": "aegir release --type major --docs",
1717
"coverage": "aegir coverage",
18-
"coverage-publish": "aegir coverage --provider coveralls"
18+
"coverage-publish": "aegir coverage --provider coveralls",
19+
"update-constants": "node update-constants.js"
1920
},
2021
"files": [
2122
"src",
@@ -33,15 +34,15 @@
3334
"url": "https://github.com/multiformats/js-multihash/issues"
3435
},
3536
"dependencies": {
36-
"buffer": "^5.5.0",
37+
"buffer": "^5.6.0",
3738
"multibase": "^0.7.0",
3839
"varint": "^5.0.0"
3940
},
4041
"devDependencies": {
41-
"aegir": "^21.4.4",
42+
"aegir": "^21.9.0",
4243
"chai": "^4.1.2",
4344
"dirty-chai": "^2.0.1",
44-
"pre-commit": "^1.2.2"
45+
"ipfs-utils": "^2.2.0"
4546
},
4647
"contributors": [
4748
"David Dias <[email protected]>",

0 commit comments

Comments
 (0)