Repository navigation
Commit 4bbca65
Add a fixture registering via the deprecated
* Add a fixture registering via the deprecated napi_module_register
The host gained support for addons that register themselves by calling
napi_module_register while their library loads (#445), but nothing in the
repo exercises that path — every other addon here exports
napi_register_module_v1, which the loader finds first.
This addon exports no such symbol, so it only loads if the fallback works.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ugFE6vmMUVMTuoupvhMhX
* Trigger the label-gated CI jobs
The check workflow only re-evaluates its label conditions on opened,
synchronize and reopened events, so the labels added after opening this
PR need a push to take effect.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ugFE6vmMUVMTuoupvhMhX
* Drop the gyp file from the module-register fixture
Nothing builds this from binding.gyp — cmake-rn drives the CMake project
directly. The sibling fixtures keep theirs to stay close to upstream
sources they were derived from, which does not apply to an addon written
here.
CMakeLists.txt is now hand-maintained rather than regenerated by
gyp-to-cmake, which skips the directory now that there is no binding.gyp.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ugFE6vmMUVMTuoupvhMhX
* Require the addon directly instead of through bindings
The bindings package earns its place when an addon has to be found across
the several output directories node-gyp might have used. This addon is
built by cmake-rn to one known location, so a plain require says the same
thing with one less dependency — and it exercises the Babel plugin's
ordinary require path rather than its bindings special case.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ugFE6vmMUVMTuoupvhMhX
---------
Co-authored-by: Claude <noreply@anthropic.com>napi_module_register (#446)1 parent bd03b8f commit 4bbca65
5 files changed
Lines changed: 87 additions & 0 deletions
File tree
- packages/node-addon-examples
- src
- tests/module-register
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments