Skip to content

Commit 1564ee4

Browse files
committed
Added service_worker option alias
1 parent 8cca8d8 commit 1564ee4

File tree

5 files changed

+84
-82
lines changed

5 files changed

+84
-82
lines changed

docs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/worker/class.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Hook from './hook.js';
1111
* @prop {string | object} [config] the optional config to use within such interpreter
1212
* @prop {string} [configURL] the optional configURL used to resolve config entries
1313
* @prop {string} [serviceWorker] the optional Service Worker for SharedArrayBuffer fallback
14+
* @prop {string} [service_worker] alias for `serviceWorker`
1415
*/
1516

1617
// REQUIRES INTEGRATION TEST
@@ -34,7 +35,8 @@ export default (...args) =>
3435
// fallback to a generic, ignored, config.txt file to still provide a URL.
3536
const [ config ] = getConfigURLAndType(options.config, options.configURL);
3637

37-
const worker = xworker({ serviceWorker: options?.serviceWorker });
38+
const serviceWorker = options?.serviceWorker || options?.service_worker;
39+
const worker = xworker({ serviceWorker });
3840
const { postMessage } = worker;
3941
const isHook = this instanceof Hook;
4042

package-lock.json

Lines changed: 77 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
"@zip.js/zip.js": "^2.7.47",
4646
"c8": "^10.1.2",
4747
"chokidar": "^3.6.0",
48-
"eslint": "^9.7.0",
48+
"eslint": "^9.8.0",
4949
"linkedom": "^0.18.4",
50-
"rollup": "^4.19.0",
50+
"rollup": "^4.19.1",
5151
"static-handler": "^0.4.3",
5252
"typescript": "^5.5.4"
5353
},

0 commit comments

Comments
 (0)