A linkable and runtime-injectable Node-API implementation that allows native addons to be built without direct linking against a Node-API provider. Version 0.1.1 is the latest stable release, part of the React Native Node-API project. It is a thin shim that exposes only Node-API function declarations, enabling runtime injection of the actual implementation by the host (e.g., React Native runtime), solving Android dynamic linker symbol resolution issues. Unlike typical Node-API bindings, it decouples addon compilation from the runtime, supporting React Native and potentially other contexts. Dependencies: none. Release cadence: early stage, active development.
npm install weak-node-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a NodeApiHost and defining a module with weak-node-api.
Replace WeakNodeApiHost with NodeApiHost.
Use import statements; if in CommonJS project, use dynamic import or switch to ESM.
Add these to tsconfig.json: { compilerOptions: { module: 'esnext', moduleResolution: 'bundler', esModuleInterop: true } }Pin exact version and monitor changes.
Install the package and ensure tsconfig.json includes 'node' types. If still failing, add 'skipLibCheck': true.
Switch to ES modules (use 'import') or use dynamic import: const weak = await import('weak-node-api');Use NodeApiHost instead.
No dependency data recorded yet.