unicode-input-toolconverter 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGES.md +4 -0
  2. package/package.json +1 -1
  3. package/sw.js +9 -1
package/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGES for unicode-input-toolconverter
2
2
 
3
+ ## 0.2.4
4
+
5
+ - fix: issue on Firefox with downloads
6
+
3
7
  ## 0.2.3
4
8
 
5
9
  - chore: update builds
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unicode-input-toolconverter",
3
3
  "description": "Add-on for selecting Unicode characters by variety of means and converting between various representations",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "exports": {
6
6
  "browser": "./browser_action/index.js"
7
7
  },
package/sw.js CHANGED
@@ -132,7 +132,7 @@ const pathToUnicodeDataJSON =
132
132
  // installed service worker actually detect the update (the update check
133
133
  // is a byte-for-byte diff of this script) instead of silently continuing
134
134
  // to serve a stale cache indefinitely.
135
- const BUILD_VERSION = '0.2.2';
135
+ const BUILD_VERSION = '0.2.3';
136
136
 
137
137
  console.log('sw info', pathToStaticJSON);
138
138
 
@@ -289,6 +289,14 @@ sw.addEventListener('fetch', /**
289
289
  ) {
290
290
  return;
291
291
  }
292
+ // Never cached/prefetched (see `sw-unicode-data.json`), and streaming
293
+ // this large a download (~40MB+) back through the service worker's
294
+ // own relayed `fetch` causes Firefox (though not Chrome) to fail
295
+ // with "Error in input stream" once the transfer runs long. Skip
296
+ // interception entirely so the browser fetches it directly.
297
+ if (url.includes('/download/unihan/unihan.json')) {
298
+ return;
299
+ }
292
300
  console.log('fetching', url);
293
301
  e.respondWith((async () => {
294
302
  const cached = await caches.match(request);