jiren 3.9.0 → 3.9.1

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.
@@ -1,8 +1,15 @@
1
1
  import { JirenClient as NativeJirenClient } from "./client";
2
2
  import { JirenClient as FetchJirenClient } from "./client-node-fetch";
3
- import { isNativeAvailable } from "./native";
3
+ import { isNativeAvailable, nativeAvailabilityError } from "./native";
4
4
 
5
5
  const forceFallback = process.env.JIREN_FORCE_FETCH_FALLBACK === "1";
6
+ let didWarnNativeUnavailable = false;
7
+
8
+ if (!forceFallback && !isNativeAvailable && !didWarnNativeUnavailable) {
9
+ didWarnNativeUnavailable = true;
10
+ const reason = nativeAvailabilityError?.message ?? "unknown reason";
11
+ console.warn(`[Jiren] Bun native unavailable, using fetch fallback. ${reason}`);
12
+ }
6
13
 
7
14
  export const JirenClient = (
8
15
  !forceFallback && isNativeAvailable ? NativeJirenClient : FetchJirenClient
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jiren",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "author": "",
5
5
  "main": "index.ts",
6
6
  "module": "index.ts",