This repository was archived by the owner on Apr 29, 2020. It is now read-only.
File tree 7 files changed +31
-18
lines changed
7 files changed +31
-18
lines changed Original file line number Diff line number Diff line change @@ -31,3 +31,6 @@ node_modules
31
31
32
32
# Optional REPL history
33
33
.node_repl_history
34
+
35
+ # Lockfile
36
+ package-lock.json
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ /* eslint-disable no-console */
4
+
1
5
const http = require ( 'http' )
2
6
const IPFSMultipart = require ( '.' )
3
7
Original file line number Diff line number Diff line change 3
3
"version" : " 0.1.0" ,
4
4
"description" : " A set of utilities to help dealing with IPFS multipart." ,
5
5
"leadMaintainer" :
" Hugo Dias <[email protected] >" ,
6
- "main" : " lib /index.js" ,
6
+ "main" : " src /index.js" ,
7
7
"scripts" : {
8
- "test" : " mocha test/index.js" ,
9
- "lint" : " standard --verbose | snazzy"
8
+ "lint" : " aegir lint" ,
9
+ "build" : " aegir build" ,
10
+ "test" : " aegir test -t node" ,
11
+ "release" : " aegir release --target node" ,
12
+ "release-minor" : " aegir release --type minor --target node" ,
13
+ "release-major" : " aegir release --type major --target node" ,
14
+ "coverage" : " aegir coverage" ,
15
+ "coverage-publish" : " aegir coverage --provider codecov"
10
16
},
11
- "pre-commit" : [
12
- " test" ,
13
- " lint"
14
- ],
15
17
"repository" : {
16
18
"type" : " git" ,
17
19
"url" : " git+https://github.com/xicombd/ipfs-multipart.git"
28
30
},
29
31
"homepage" : " https://github.com/xicombd/ipfs-multipart#readme" ,
30
32
"devDependencies" : {
31
- "chai" : " ^3.5.0" ,
33
+ "aegir" : " ^14.0.0" ,
34
+ "chai" : " ^4.1.2" ,
32
35
"ipfs-api" : " github:ipfs/js-ipfs-api#1fd9749" ,
33
- "mocha" : " ^2.4.5" ,
34
- "pre-commit" : " ^1.1.2" ,
35
- "request" : " ^2.69.0" ,
36
- "snazzy" : " ^3.0.0" ,
37
- "standard" : " ^6.0.7"
36
+ "request" : " ^2.87.0"
38
37
},
39
38
"dependencies" : {
40
- "content" : " ^3 .0.0 " ,
41
- "dicer" : " ^ 0.2.5"
39
+ "content" : " ^4 .0.5 " ,
40
+ "dicer" : " ~ 0.2.5"
42
41
}
43
42
}
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
1
3
const content = require ( 'content' )
2
4
const Parser = require ( './parser' )
3
5
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const parseDisposition = (disposition) => {
16
16
const details = { }
17
17
details . type = disposition . split ( ';' ) [ 0 ]
18
18
if ( details . type === 'file' || details . type === 'form-data' ) {
19
- const namePattern = / \ f i l e n a m e = \ "( .[ ^ \ "] + ) \ "/
19
+ const namePattern = / f i l e n a m e = " ( .[ ^ " ] + ) " /
20
20
const matches = disposition . match ( namePattern )
21
21
details . name = matches ? matches [ 1 ] : ''
22
22
}
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
1
3
/* eslint-env mocha */
4
+
2
5
const fs = require ( 'fs' )
3
6
4
7
describe ( 'multipart' , ( ) => {
Original file line number Diff line number Diff line change 1
- /* eslint-env mocha */
2
1
'use strict'
3
2
3
+ /* eslint-env mocha */
4
+ /* eslint-disable no-unused-expressions */
5
+
4
6
const expect = require ( 'chai' ) . expect
5
7
const APIctl = require ( 'ipfs-api' )
6
8
const http = require ( 'http' )
@@ -187,7 +189,7 @@ describe('parser', () => {
187
189
} )
188
190
189
191
it ( 'parses ctl.add buffer correctly' , ( done ) => {
190
- ctl . add ( new Buffer ( 'hello world' ) , ( err , res ) => {
192
+ ctl . add ( Buffer . from ( 'hello world' ) , ( err , res ) => {
191
193
expect ( err ) . to . not . exist
192
194
193
195
expect ( files . length ) . to . equal ( 1 )
You can’t perform that action at this time.
0 commit comments