sliftutils 1.1.45 → 1.1.46

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.
@@ -4,7 +4,8 @@
4
4
  "WebFetch(domain:openrouter.ai)",
5
5
  "Bash(git pull *)",
6
6
  "Bash(echo \"---EXIT:$?---\")",
7
- "Bash(yarn publish *)"
7
+ "Bash(yarn publish *)",
8
+ "Bash(git push *)"
8
9
  ]
9
10
  }
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -13,7 +13,11 @@ const subscribers = new Map<string, ((write: RemoteWrite) => void)[]>();
13
13
  const recentResolvers = new Map<string, ((writes: RemoteWrite[]) => void)[]>();
14
14
 
15
15
  export function isSyncSupported(): boolean {
16
- return typeof SharedWorker !== "undefined";
16
+ if (typeof SharedWorker === "undefined") return false;
17
+ // Under file:// the SharedWorker constructor throws a SecurityError (cross-origin / opaque
18
+ // origin), so skip it rather than logging that error on every load.
19
+ if (typeof location !== "undefined" && location.protocol === "file:") return false;
20
+ return true;
17
21
  }
18
22
 
19
23
  function ensure() {