+14
-4
@@ -532,3 +532,13 @@ // prettier-ignore | ||
| if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { | ||
| // NAPI_RS_FORCE_WASI is a tri-state flag: | ||
| // unset / any other value → native binding preferred, WASI is only a fallback | ||
| // 'true' → force WASI fallback even if native loaded | ||
| // 'error' → force WASI and throw if no WASI binding is found | ||
| // Treating any non-empty string as truthy (the historical behavior) meant | ||
| // NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered | ||
| // the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file. | ||
| const forceWasi = | ||
| process.env.NAPI_RS_FORCE_WASI === 'true' || process.env.NAPI_RS_FORCE_WASI === 'error' | ||
| if (!nativeBinding || forceWasi) { | ||
| let wasiBinding = null | ||
@@ -540,7 +550,7 @@ let wasiBindingError = null | ||
| } catch (err) { | ||
| if (process.env.NAPI_RS_FORCE_WASI) { | ||
| if (forceWasi) { | ||
| wasiBindingError = err | ||
| } | ||
| } | ||
| if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { | ||
| if (!nativeBinding || forceWasi) { | ||
| try { | ||
@@ -550,3 +560,3 @@ wasiBinding = require('@mdream/rust-wasm32-wasi') | ||
| } catch (err) { | ||
| if (process.env.NAPI_RS_FORCE_WASI) { | ||
| if (forceWasi) { | ||
| if (!wasiBindingError) { | ||
@@ -553,0 +563,0 @@ wasiBindingError = err |
+15
-15
| { | ||
| "name": "mdream", | ||
| "type": "module", | ||
| "version": "1.2.2", | ||
| "version": "1.3.0", | ||
| "description": "Ultra-performant HTML to Markdown Convertor Optimized for LLMs and llm.txt artifacts.", | ||
@@ -55,18 +55,18 @@ "author": { | ||
| "optionalDependencies": { | ||
| "@mdream/rust-android-arm-eabi": "1.2.2", | ||
| "@mdream/rust-android-arm64": "1.2.2", | ||
| "@mdream/rust-darwin-arm64": "1.2.2", | ||
| "@mdream/rust-darwin-x64": "1.2.2", | ||
| "@mdream/rust-linux-arm64-gnu": "1.2.2", | ||
| "@mdream/rust-freebsd-x64": "1.2.2", | ||
| "@mdream/rust-linux-arm64-musl": "1.2.2", | ||
| "@mdream/rust-linux-arm-gnueabihf": "1.2.2", | ||
| "@mdream/rust-linux-x64-gnu": "1.2.2", | ||
| "@mdream/rust-linux-x64-musl": "1.2.2", | ||
| "@mdream/rust-win32-x64-msvc": "1.2.2", | ||
| "@mdream/rust-wasm32-wasi": "1.2.2", | ||
| "@mdream/rust-win32-arm64-msvc": "1.2.2" | ||
| "@mdream/rust-android-arm64": "1.3.0", | ||
| "@mdream/rust-darwin-arm64": "1.3.0", | ||
| "@mdream/rust-android-arm-eabi": "1.3.0", | ||
| "@mdream/rust-darwin-x64": "1.3.0", | ||
| "@mdream/rust-linux-arm-gnueabihf": "1.3.0", | ||
| "@mdream/rust-linux-x64-gnu": "1.3.0", | ||
| "@mdream/rust-linux-arm64-gnu": "1.3.0", | ||
| "@mdream/rust-linux-arm64-musl": "1.3.0", | ||
| "@mdream/rust-freebsd-x64": "1.3.0", | ||
| "@mdream/rust-wasm32-wasi": "1.3.0", | ||
| "@mdream/rust-win32-arm64-msvc": "1.3.0", | ||
| "@mdream/rust-win32-x64-msvc": "1.3.0", | ||
| "@mdream/rust-linux-x64-musl": "1.3.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@mdream/js": "1.2.2" | ||
| "@mdream/js": "1.3.0" | ||
| }, | ||
@@ -73,0 +73,0 @@ "scripts": { |
@@ -5,3 +5,3 @@ { | ||
| "description": "WebAssembly edge runtime bindings for mdream HTML-to-Markdown converter", | ||
| "version": "1.2.2", | ||
| "version": "1.3.0", | ||
| "license": "MIT", | ||
@@ -8,0 +8,0 @@ "files": [ |
@@ -5,3 +5,3 @@ { | ||
| "description": "WebAssembly edge runtime bindings for mdream HTML-to-Markdown converter", | ||
| "version": "1.2.2", | ||
| "version": "1.3.0", | ||
| "license": "MIT", | ||
@@ -8,0 +8,0 @@ "files": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
800534
3.1%3123
1.49%61
-3.17%