roxify 1.7.1 → 1.7.2

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.
@@ -99,10 +99,16 @@ function getNativeModule() {
99
99
  candidates.push(resolve(root, 'target', profile, 'roxify_native.node'));
100
100
  }
101
101
  }
102
- // --- 3. Generic fallback names (ONLY if platform-specific not found) ---
103
- // These are kept last intentionally: a generic roxify_native.node
104
- // could be for the WRONG platform if multiple are shipped.
105
- candidates.push(resolve(moduleDir, '..', 'roxify_native.node'), resolve(moduleDir, '..', 'libroxify_native.node'), resolve(root, 'roxify_native.node'), resolve(root, 'libroxify_native.node'), resolve(root, 'node_modules', 'roxify', 'roxify_native.node'), resolve(root, 'node_modules', 'roxify', 'libroxify_native.node'), resolve(moduleDir, '..', '..', 'roxify_native.node'), resolve(moduleDir, '..', '..', 'libroxify_native.node'));
102
+ // --- 3. Generic fallback names ---
103
+ // ONLY used when a platform-specific triple file also exists next to it,
104
+ // or when we are on the SAME platform that built the generic file (dev mode).
105
+ // In production (npm install), the platform-specific files MUST exist.
106
+ // We do NOT blindly load roxify_native.node because it could be a Linux
107
+ // binary loaded on Windows (or vice-versa), causing ERR_DLOPEN_FAILED.
108
+ //
109
+ // Generic names are ONLY safe in local dev (where you just built for your
110
+ // own platform). We keep them but ONLY for target/release/ build outputs.
111
+ // The root-level roxify_native.node is intentionally excluded.
106
112
  // Deduplicate
107
113
  const seen = new Set();
108
114
  const unique = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roxify",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "type": "module",
5
5
  "description": "Ultra-lightweight PNG steganography with native Rust acceleration. Encode binary data into PNG images with zstd compression.",
6
6
  "main": "dist/index.js",
@@ -58,7 +58,7 @@
58
58
  "release:flow": "node scripts/release-flow.cjs",
59
59
  "release:flow:auto": "AUTO_PUBLISH=1 node scripts/release-flow.cjs",
60
60
  "publish": "node scripts/publish.cjs",
61
- "prepublishOnly": "npm run build && npm run build:native && npm run postbuild:native && npm run clean:targets",
61
+ "prepublishOnly": "npm run build",
62
62
  "test": "npm run build && node ./test/run-all-tests.cjs",
63
63
  "test:integration": "node scripts/run-integration-tests.cjs",
64
64
  "cli": "node dist/cli.js"
Binary file