filelist-utils
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -10,3 +10,3 @@ import { ExpandOptions } from './ExpandOptions'; | ||
* By default this method will expand all zip and gzip files | ||
* @param path | ||
* @param fileList - iterable object obtained using a input type="file" with webkitRelativePath property | ||
* @returns | ||
@@ -13,0 +13,0 @@ */ |
@@ -10,3 +10,3 @@ import { FileCollection } from './FileCollection'; | ||
* By default this method will expand all zip and gzip files | ||
* @param path | ||
* @param fileList - iterable object obtained using a input type="file" with webkitRelativePath property | ||
* @returns | ||
@@ -17,14 +17,9 @@ */ | ||
for (const file of fileList) { | ||
if (!file.webkitRelativePath) { | ||
throw new Error('The File of FileList must have the property webkitRelativePath. Did you forget to add the webkitdirectory property in the input element ?'); | ||
} | ||
fileCollectionItems.push({ | ||
name: file.name, | ||
size: file.size, | ||
relativePath: file.webkitRelativePath, | ||
relativePath: file.webkitRelativePath || file.name, | ||
lastModified: file.lastModified, | ||
text: () => file.text(), | ||
arrayBuffer: () => file.arrayBuffer(), | ||
//TODO check why this is happening | ||
//@ts-expect-error is this due to different of stream ? not a web stream ? | ||
stream: () => file.stream(), | ||
@@ -31,0 +26,0 @@ }); |
@@ -5,2 +5,3 @@ export * from './fileCollectionFromPath'; | ||
export * from './fileCollectionFromFileList'; | ||
export * from './fileCollectionFromFiles'; | ||
export * from './groupFiles'; | ||
@@ -7,0 +8,0 @@ export * from './FileCollection'; |
@@ -5,2 +5,3 @@ export * from './fileCollectionFromPath'; | ||
export * from './fileCollectionFromFileList'; | ||
export * from './fileCollectionFromFiles'; | ||
export * from './groupFiles'; | ||
@@ -7,0 +8,0 @@ export * from './FileCollection'; |
@@ -10,3 +10,3 @@ import { ExpandOptions } from './ExpandOptions'; | ||
* By default this method will expand all zip and gzip files | ||
* @param path | ||
* @param fileList - iterable object obtained using a input type="file" with webkitRelativePath property | ||
* @returns | ||
@@ -13,0 +13,0 @@ */ |
@@ -13,3 +13,3 @@ "use strict"; | ||
* By default this method will expand all zip and gzip files | ||
* @param path | ||
* @param fileList - iterable object obtained using a input type="file" with webkitRelativePath property | ||
* @returns | ||
@@ -20,14 +20,9 @@ */ | ||
for (const file of fileList) { | ||
if (!file.webkitRelativePath) { | ||
throw new Error('The File of FileList must have the property webkitRelativePath. Did you forget to add the webkitdirectory property in the input element ?'); | ||
} | ||
fileCollectionItems.push({ | ||
name: file.name, | ||
size: file.size, | ||
relativePath: file.webkitRelativePath, | ||
relativePath: file.webkitRelativePath || file.name, | ||
lastModified: file.lastModified, | ||
text: () => file.text(), | ||
arrayBuffer: () => file.arrayBuffer(), | ||
//TODO check why this is happening | ||
//@ts-expect-error is this due to different of stream ? not a web stream ? | ||
stream: () => file.stream(), | ||
@@ -34,0 +29,0 @@ }); |
@@ -5,2 +5,3 @@ export * from './fileCollectionFromPath'; | ||
export * from './fileCollectionFromFileList'; | ||
export * from './fileCollectionFromFiles'; | ||
export * from './groupFiles'; | ||
@@ -7,0 +8,0 @@ export * from './FileCollection'; |
@@ -21,2 +21,3 @@ "use strict"; | ||
__exportStar(require("./fileCollectionFromFileList"), exports); | ||
__exportStar(require("./fileCollectionFromFiles"), exports); | ||
__exportStar(require("./groupFiles"), exports); | ||
@@ -23,0 +24,0 @@ __exportStar(require("./FileCollection"), exports); |
{ | ||
"name": "filelist-utils", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Create a FileCollection from a path or a zip file", | ||
@@ -48,12 +48,13 @@ "main": "./lib/index.js", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@types/jest": "^29.0.3", | ||
"@types/jest": "^29.1.2", | ||
"@types/pako": "^2.0.0", | ||
"cheminfo-build": "^1.1.11", | ||
"eslint": "^8.24.0", | ||
"eslint": "^8.25.0", | ||
"eslint-config-cheminfo-typescript": "^11.1.0", | ||
"jest": "^29.0.3", | ||
"msw": "^0.47.3", | ||
"jest": "^29.1.2", | ||
"msw": "^0.47.4", | ||
"prettier": "^2.7.1", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.8.3" | ||
"typescript": "^4.8.4", | ||
"undici": "^5.11.0" | ||
}, | ||
@@ -60,0 +61,0 @@ "dependencies": { |
@@ -13,3 +13,3 @@ import { ExpandOptions } from './ExpandOptions'; | ||
* By default this method will expand all zip and gzip files | ||
* @param path | ||
* @param fileList - iterable object obtained using a input type="file" with webkitRelativePath property | ||
* @returns | ||
@@ -24,16 +24,9 @@ */ | ||
for (const file of fileList) { | ||
if (!file.webkitRelativePath) { | ||
throw new Error( | ||
'The File of FileList must have the property webkitRelativePath. Did you forget to add the webkitdirectory property in the input element ?', | ||
); | ||
} | ||
fileCollectionItems.push({ | ||
name: file.name, | ||
size: file.size, | ||
relativePath: file.webkitRelativePath, | ||
relativePath: file.webkitRelativePath || file.name, | ||
lastModified: file.lastModified, | ||
text: () => file.text(), | ||
arrayBuffer: () => file.arrayBuffer(), | ||
//TODO check why this is happening | ||
//@ts-expect-error is this due to different of stream ? not a web stream ? | ||
stream: () => file.stream(), | ||
@@ -40,0 +33,0 @@ }); |
@@ -5,4 +5,5 @@ export * from './fileCollectionFromPath'; | ||
export * from './fileCollectionFromFileList'; | ||
export * from './fileCollectionFromFiles'; | ||
export * from './groupFiles'; | ||
export * from './FileCollection'; | ||
export * from './FileCollectionItem'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138497
165
2130
13