Skip to content

Commit 048c884

Browse files
authored
fix: downgrade to 12.20 support (#134)
* downgrade to 12.20 support
1 parent 978ee33 commit 048c884

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Started running test against WPTs own test
1111
### Changed
1212
- Updated fetch-blob dep
13+
- downgraded optional chaining to support node 12.20
1314
### Removed
1415
- removed travis build process file
1516
- removed empty npmignore file

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fd.append('file-upload', file)
3232
fd.append('file-upload', {
3333
size: 123,
3434
type: '',
35-
name: 'cat.mp4',
35+
name: 'cat-video.mp4',
3636
stream() { return stream },
3737
[Symbol.toStringTag]: 'File'
3838
})

esm.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import F from 'fetch-blob/file.js'
66
var {toStringTag:t,iterator:i,hasInstance:h}=Symbol,
77
r=Math.random,
88
m='append,set,get,getAll,delete,keys,values,entries,forEach,constructor'.split(','),
9-
f=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b?.[t])?[(c=c!==void 0?c+'':b[t]=='File'?b.name:'blob',a),b.name!==c||b[t]=='blob'?new F([b],c,b):b]:[a,b+'']),
9+
f=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b && b[t])?[(c=c!==void 0?c+'':b[t]=='File'?b.name:'blob',a),b.name!==c||b[t]=='blob'?new F([b],c,b):b]:[a,b+'']),
1010
e=(c,f)=>(f?c:c.replace(/\r?\n|\r/g,'\r\n')).replace(/\n/g,'%0A').replace(/\r/g,'%0D').replace(/"/g,'%22'),
1111
x=(n, a, e)=>{if(a.length<e){throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e} arguments required, but only ${a.length} present.`)}}
1212

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"formdata.min.js",
2424
"README.md"
2525
],
26+
"engines": {
27+
"node": ">=12.20.0"
28+
},
2629
"keywords": [
2730
"formdata",
2831
"fetch",

0 commit comments

Comments
 (0)