v0.8.0
breaking changes:
getFile() will continue to support a simple string as return value but the object form is now { type, getContentData }
instead of { type, content }
This mean that, since v0.8.0, and only if your options.getFile
returns an object, then you have to use :
async getFile(url) {
const res = await fetch(url);
if ( !res.ok )
throw Object.assign(new Error(res.statusText + ' ' + url), { res });
return {
getContentData: asBinary => asBinary ? res.arrayBuffer() : res.text(),
}
},
instead of
async getFile(url) {
const res = await fetch(url);
if ( !res.ok )
throw Object.assign(new Error(res.statusText + ' ' + url), { res });
return await res.text();
},
for more details, see CHANGELOG.md