This repository was archived by the owner on Aug 24, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +29
-25
lines changed Expand file tree Collapse file tree 5 files changed +29
-25
lines changed Original file line number Diff line number Diff line change 18
18
- run : npx aegir build
19
19
- run : npx aegir dep-check
20
20
- uses : ipfs/aegir/actions/bundle-size@master
21
- name : size
22
21
with :
23
22
github_token : ${{ secrets.GITHUB_TOKEN }}
24
23
test-node :
@@ -27,30 +26,41 @@ jobs:
27
26
strategy :
28
27
matrix :
29
28
os : [windows-latest, ubuntu-latest, macos-latest]
30
- node : [12, 14 ]
29
+ node : [14, 15 ]
31
30
fail-fast : true
32
31
steps :
33
32
- uses : actions/checkout@v2
34
33
- uses : actions/setup-node@v1
35
34
with :
36
35
node-version : ${{ matrix.node }}
37
36
- run : npm install
38
- - run : npx nyc --reporter=lcov aegir test -t node -- --bail
37
+ - run : npx aegir test -t node --bail --cov
39
38
- uses : codecov/codecov-action@v1
40
39
test-chrome :
41
40
needs : check
42
41
runs-on : ubuntu-latest
43
42
steps :
44
43
- uses : actions/checkout@v2
44
+ - uses : microsoft/playwright-github-action@v1
45
45
- run : npm install
46
- - run : npx aegir test -t browser -t webworker --bail
46
+ - run : npx aegir test -t browser -t webworker --bail --cov
47
+ - uses : codecov/codecov-action@v1
47
48
test-firefox :
48
49
needs : check
49
50
runs-on : ubuntu-latest
50
51
steps :
51
52
- uses : actions/checkout@v2
53
+ - uses : microsoft/playwright-github-action@v1
54
+ - run : npm install
55
+ - run : npx aegir test -t browser -t webworker --bail -- --browser firefox
56
+ test-webkit :
57
+ needs : check
58
+ runs-on : ubuntu-latest
59
+ steps :
60
+ - uses : actions/checkout@v2
61
+ - uses : microsoft/playwright-github-action@v1
52
62
- run : npm install
53
- - run : npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
63
+ - run : npx aegir test -t browser -t webworker --bail -- --browser webkit
54
64
test-electron-main :
55
65
needs : check
56
66
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -35,4 +35,5 @@ node_modules
35
35
36
36
dist
37
37
docs
38
- yarn.lock
38
+ yarn.lock
39
+ .nyc_output
Original file line number Diff line number Diff line change 30
30
},
31
31
"main" : " src/index.js" ,
32
32
"types" : " dist/src/index.d.ts" ,
33
- "typesVersions" : {
34
- "*" : {
35
- "src/*" : [
36
- " dist/src/*" ,
37
- " dist/src/*/index"
38
- ],
39
- "src/" : [
40
- " dist/src/index"
41
- ]
42
- }
43
- },
44
33
"repository" : " github:multiformats/js-multihash" ,
45
34
"dependencies" : {
46
- "multibase" : " ^3.1.0 " ,
47
- "uint8arrays" : " ^2.0.5 " ,
35
+ "multibase" : " ^4.0.1 " ,
36
+ "uint8arrays" : " ^2.1.3 " ,
48
37
"varint" : " ^6.0.0"
49
38
},
50
39
"devDependencies" : {
51
- "aegir" : " ^30.3 .0" ,
52
- "ipfs-utils" : " ^5 .0.1"
40
+ "aegir" : " ^31.0 .0" ,
41
+ "ipfs-utils" : " ^6 .0.1"
53
42
},
54
43
"eslintConfig" : {
55
44
"extends" : " ipfs"
56
45
},
46
+ "aegir" : {
47
+ "build" : {
48
+ "bundlesizeMax" : " 5.8kB"
49
+ }
50
+ },
57
51
"contributors" : [
58
52
" David Dias <daviddias.p@gmail.com>" ,
59
53
" Hugo Dias <hugomrdias@gmail.com>" ,
79
73
" Alan Shaw <alan@tableflip.io>"
80
74
],
81
75
"engines" : {
82
- "node" : " >=10 .0.0" ,
76
+ "node" : " >=14 .0.0" ,
83
77
"npm" : " >=6.0.0"
84
78
}
85
79
}
Original file line number Diff line number Diff line change 1
1
/**
2
2
* Multihash implementation in JavaScript.
3
- *
4
- * @module multihash
5
3
*/
6
4
'use strict'
7
5
@@ -19,6 +17,7 @@ for (const key in names) {
19
17
const name = /** @type {HashName } */ ( key )
20
18
codes [ names [ name ] ] = name
21
19
}
20
+ Object . freeze ( codes )
22
21
23
22
/**
24
23
* Convert the given multihash to a hex encoded string.
@@ -229,7 +228,7 @@ function prefix (multihash) {
229
228
230
229
module . exports = {
231
230
names,
232
- codes : Object . freeze ( codes ) ,
231
+ codes,
233
232
toHexString,
234
233
fromHexString,
235
234
toB58String,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments