Skip to content

v0.8.0

Compare
Choose a tag to compare
@FranckFreiburger FranckFreiburger released this 31 May 10:51
· 219 commits to main since this release

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