File tree Expand file tree Collapse file tree 8 files changed +91
-20
lines changed Expand file tree Collapse file tree 8 files changed +91
-20
lines changed Original file line number Diff line number Diff line change
1
+ coverage :
2
+ round : up
3
+ precision : 2
4
+ parsers :
5
+ javascript :
6
+ enable_partials : yes
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+ pull_request :
7
+ paths :
8
+ - " **.js"
9
+ - " package.json"
10
+ - " .github/workflows/ci.yml"
11
+
12
+ jobs :
13
+ test :
14
+ strategy :
15
+ matrix :
16
+ os : [ubuntu-latest, windows-latest, macOS-latest]
17
+ node : ["14", "12", engines]
18
+ exclude :
19
+ # On Windows, run tests with only the LTS environments.
20
+ - os : windows-latest
21
+ node : engines
22
+ - os : windows-latest
23
+ node : " 14"
24
+ # On macOS, run tests with only the LTS environments.
25
+ - os : macOS-latest
26
+ node : engines
27
+ - os : macOS-latest
28
+ node : " 14"
29
+
30
+ runs-on : ${{ matrix.os }}
31
+ steps :
32
+ - uses : actions/checkout@v2
33
+
34
+ - name : Get Node.JS version from package.json
35
+ if : matrix.node == 'engines'
36
+ id : get-version
37
+ run : echo ::set-output name=node::$(npx --q minimum-node-version)
38
+
39
+ - uses : actions/setup-node@v2-beta
40
+ if : matrix.node != 'engines'
41
+ with :
42
+ node-version : ${{ matrix.node }}
43
+
44
+ - uses : actions/setup-node@v2-beta
45
+ if : matrix.node == 'engines'
46
+ with :
47
+ node-version : ${{steps.get-version.outputs.node}}
48
+
49
+ - run : npm install
50
+
51
+ - run : npm run report -- --colors
52
+
53
+ - name : Upload coverage to Codecov
54
+ uses : codecov/codecov-action@v1
55
+ with :
56
+ file : ./coverage/coverage-final.json
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - " **.js"
7
+ - " **eslint**"
8
+ - " package.json"
9
+ - " .github/workflows/lint.yml"
10
+ jobs :
11
+ lint :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ - name : Use Node.js
16
+ uses : actions/setup-node@v2-beta
17
+ with :
18
+ node-version : 14
19
+ - run : npm install
20
+ - run : npm run lint
Original file line number Diff line number Diff line change 1
- package-lock = false
1
+ package-lock = false
2
+ save-exact = false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# fetch-blob
2
2
3
3
[ ![ npm version] [ npm-image ]] [ npm-url ]
4
- [ ![ build status] [ travis -image]] [ travis -url]
4
+ [ ![ build status] [ ci -image]] [ ci -url]
5
5
[ ![ coverage status] [ codecov-image ]] [ codecov-url ]
6
6
[ ![ install size] [ install-size-image ]] [ install-size-url ]
7
7
@@ -31,8 +31,8 @@ See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blo
31
31
32
32
[ npm-image ] : https://flat.badgen.net/npm/v/fetch-blob
33
33
[ npm-url ] : https://www.npmjs.com/package/fetch-blob
34
- [ travis -image] : https://flat.badgen.net/travis/ node-fetch/fetch-blob
35
- [ travis -url] : https://travis-ci.org /node-fetch/fetch-blob
34
+ [ ci -image] : https://github.com/ node-fetch/fetch-blob/workflows/CI/badge.svg
35
+ [ ci -url] : https://github.com /node-fetch/fetch-blob/actions
36
36
[ codecov-image ] : https://flat.badgen.net/codecov/c/github/node-fetch/fetch-blob/master
37
37
[ codecov-url ] : https://codecov.io/gh/node-fetch/fetch-blob
38
38
[ install-size-image ] : https://flat.badgen.net/packagephobia/install/fetch-blob
Original file line number Diff line number Diff line change 10
10
"scripts" : {
11
11
"lint" : " xo" ,
12
12
"test" : " xo && ava" ,
13
- "report" : " nyc ava" ,
14
- "coverage" : " nyc --reporter json --reporter text ava && codecov -f coverage/coverage-final.json" ,
13
+ "report" : " c8 --reporter json --reporter text ava" ,
14
+ "coverage" : " c8 --reporter json --reporter text ava && codecov -f coverage/coverage-final.json" ,
15
15
"prepublishOnly" : " tsc --declaration --emitDeclarationOnly --allowJs index.js"
16
16
},
17
17
"repository" : " https://github.com/node-fetch/fetch-blob.git" ,
30
30
"homepage" : " https://github.com/node-fetch/fetch-blob#readme" ,
31
31
"devDependencies" : {
32
32
"ava" : " ^3.8.2" ,
33
+ "c8" : " ^7.2.0" ,
33
34
"codecov" : " ^3.7.0" ,
34
35
"get-stream" : " ^5.1.0" ,
35
36
"node-fetch" : " ^2.6.0" ,
36
- "nyc" : " ^15.1.0" ,
37
37
"typescript" : " ^3.9.5" ,
38
38
"xo" : " ^0.32.0"
39
39
},
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const test = require('ava');
2
2
const Blob = require ( '.' ) ;
3
3
const getStream = require ( 'get-stream' ) ;
4
4
const { Response} = require ( 'node-fetch' ) ;
5
+ const { TextDecoder} = require ( 'util' ) ;
5
6
6
7
test ( 'new Blob()' , t => {
7
8
const blob = new Blob ( ) ; // eslint-disable-line no-unused-vars
You can’t perform that action at this time.
0 commit comments