• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobotWebTools / rclnodejs / 14568976531
85%
develop: 81%

Build:
Build:
LAST BUILD BRANCH: fix-1330-11
DEFAULT BRANCH: develop
Ran 21 Apr 2025 06:59AM UTC
Jobs 3
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Apr 2025 06:53AM UTC coverage: 84.741% (-0.3%) from 85.01%
14568976531

push

github

minggangw
Migrate nan to node-addon-api for implementing the C++ addon (#1090)

The day when `rclnodejs` was initialized, [nan](https://github.com/nodejs/nan) was the only library designed to simplify the development of native addons, providing a consistent interface for interacting with the V8 JavaScript engine and Node.js APIs across different Node.js versions.

[N-API](https://nodejs.org/api/n-api.html#node-api) was introduced in Node.js v8.0.0 as an experimental feature to provide a stable Node API for native modules, it's officially supported by Node and allows developing native addons that are independent of the underlying JavaScript engine, and ensures Application Binary Interface (ABI) stability across different Node.js versions and compiler levels. so it is recommended to migrate to N-API for existing projects.

This patch leverages [node-addon-api](https://github.com/nodejs/node-addon-api) based on [Node-API](https://nodejs.org/api/n-api.html), which provides a C++ object model and exception handling semantics with low overhead, to rewrite the existing C++ bindings, including:

1. Add `node-addon-api` into dependencies.
2. Replace the `Nan` headers with `node-addon-api` headers.
3. Replace `nan` APIs with `node-addon-api` equivalents.
4. Use `Napi::Env` for environment handling.
5. Replace `Nan::ObjectWrap` with `Napi::ObjectWrap`.
6. Replace `Nan::Persistent` with `Napi::FunctionReference`.
7. Update error handling and buffer management.

After this patch, we will remove the explicit usage of classes from `v8::`.
 
Fix: #1036

708 of 928 branches covered (76.29%)

Branch coverage included in aggregate %.

9 of 14 new or added lines in 1 file covered. (64.29%)

1730 of 1949 relevant lines covered (88.76%)

1002.95 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
70.69
-15.36% lib/logging.js
Jobs
ID Job ID Ran Files Coverage
1 run-23.X - 14568976531.1 21 Apr 2025 06:59AM UTC 36
84.67
GitHub Action Run
2 run-20.X - 14568976531.2 21 Apr 2025 06:59AM UTC 36
84.74
GitHub Action Run
3 run-22.X - 14568976531.3 21 Apr 2025 06:59AM UTC 36
84.71
GitHub Action Run
Source Files on build 14568976531
  • Tree
  • List 36
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #14568976531
  • 931791bf on github
  • Prev Build on jazzy (#14330794789)
  • Next Build on jazzy (#14616130539)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc