@gjsify/napi 0.64.12 → 0.64.15

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.
Files changed (2) hide show
  1. package/meson.build +12 -2
  2. package/package.json +3 -3
package/meson.build CHANGED
@@ -40,8 +40,18 @@ foreach pkg : host_provided
40
40
  : dep
41
41
  endforeach
42
42
 
43
- # mozjs-140 (JSAPI) pulls no GLib of its own, so it stays an ordinary link dep.
44
- dependencies += dependency('mozjs-140')
43
+ # mozjs-140 (JSAPI) pulls no GLib of its own, but on darwin it is host-provided
44
+ # too: libgjs already loaded libmozjs-140 into this process, and a second link
45
+ # dep records `<brew>/opt/spidermonkey@140/lib/libmozjs-140.dylib`, which
46
+ # relocation turns into `@rpath/libmozjs-140.dylib`. Homebrew moved gjs to the
47
+ # keg-only versioned formula `spidermonkey@140`, so `<brew>/lib` (the last
48
+ # rpath) no longer holds the dylib and the load died with "Library not loaded:
49
+ # @rpath/libmozjs-140.dylib" (v0.64.13 release). Resolving against the host
50
+ # process needs no path at all and cannot drift with the formula layout.
51
+ mozjs = dependency('mozjs-140')
52
+ dependencies += host_system == 'darwin' \
53
+ ? mozjs.partial_dependency(compile_args: true, includes: true) \
54
+ : mozjs
45
55
 
46
56
  host_provided_link_args = host_system == 'darwin' ? ['-Wl,-undefined,dynamic_lookup'] : []
47
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/napi",
3
- "version": "0.64.12",
3
+ "version": "0.64.15",
4
4
  "description": "Node-API (N-API) host for GJS — implements the napi C ABI over SpiderMonkey (mozjs-140) so GJS can load unmodified compiled .node addons. The forward mirror of @gjsify/node-gi (GI in Node); this is N-API in GJS. Vala/C++ shim as .so+.gir+.typelib prebuild, loaded via imports.gi.",
5
5
  "type": "module",
6
6
  "main": "lib/esm/index.js",
@@ -97,7 +97,7 @@
97
97
  },
98
98
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/napi/napi#readme",
99
99
  "optionalDependencies": {
100
- "@gjsify/napi-darwin-arm64": "0.64.12",
101
- "@gjsify/napi-linux-x64": "0.64.12"
100
+ "@gjsify/napi-darwin-arm64": "0.64.15",
101
+ "@gjsify/napi-linux-x64": "0.64.15"
102
102
  }
103
103
  }