File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ async function postprocess() {
5050 if ( entry . isDirectory ( ) && entry . name !== 'src' && entry . name !== 'internal' && entry . name !== 'bin' ) {
5151 const subpath = './' + entry . name ;
5252 newExports [ subpath + '/*.mjs' ] = {
53- default : subpath + '/*.mjs' ,
53+ default : [ subpath + '/*.mjs' , subpath + '/*/index.mjs' ] ,
5454 } ;
5555 newExports [ subpath + '/*.js' ] = {
56- default : subpath + '/*.js' ,
56+ default : [ subpath + '/*.js' , subpath + '/*/index.js' ] ,
5757 } ;
5858 newExports [ subpath + '/*' ] = {
59- import : subpath + '/*.mjs' ,
60- require : subpath + '/*.js' ,
59+ import : [ subpath + '/*.mjs' , subpath + '/*/index.mjs' ] ,
60+ require : [ subpath + '/*.js' , subpath + '/*/index.js' ] ,
6161 } ;
6262 } else if ( entry . isFile ( ) && / \. [ c m ] ? j s $ / . test ( entry . name ) ) {
6363 const { name, ext } = path . parse ( entry . name ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ interface FileLike extends BlobLike {
5252 /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
5353 readonly lastModified : number ;
5454 /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
55- readonly name : string ;
55+ readonly name ? : string | undefined ;
5656}
5757declare var FileClass : {
5858 prototype : FileLike ;
@@ -126,7 +126,7 @@ export async function toFile(
126126 if ( File && value instanceof File ) {
127127 return value ;
128128 }
129- return makeFile ( [ await value . arrayBuffer ( ) ] , value . name ) ;
129+ return makeFile ( [ await value . arrayBuffer ( ) ] , value . name ?? 'unknown_file' ) ;
130130 }
131131
132132 if ( isResponseLike ( value ) ) {
You can’t perform that action at this time.
0 commit comments