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

RobotWebTools / rclnodejs / 27326505326
91%

Build:
DEFAULT BRANCH: develop
Ran 11 Jun 2026 06:40AM UTC
Jobs 1
Files 65
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

11 Jun 2026 05:43AM UTC coverage: 91.219% (-0.001%) from 91.22%
27326505326

push

github

web-flow
[Demo] Modernize TypeScript demos to NodeNext + ES2022 (#1534)

## 1. ESM migration of `example/` (44 files)
Converted every CommonJS example to native ESM (`.cjs` → `.mjs`):
- Dropped `'use strict'`, replaced `require('…/index.js').default` with `import rclnodejs from '…/index.js'`.
- Unwrapped `main()` / `.then().catch()` into top-level `await` + `try/catch`.
- Preserved original copyright headers.
- Updated all 10 example READMEs (`.cjs` → `.mjs`, plus the "import rclnodejs from 'rclnodejs'" note).

## 2. ESM migration of demos (3 files)
- `demo/rosocket/server.cjs` → `server.mjs`
- `demo/web/javascript/runtime.cjs` → `runtime.mjs`
- `demo/web/javascript/static.cjs` → `static.mjs` (adds `__dirname` shim via `fileURLToPath`)
- Directory imports made explicit (`../../rosocket/index.js`, `../../../lib/runtime/index.js`).
- Updated `demo/rosocket/README.md`, `demo/web/javascript/README.md`, and `demo/web/typescript/server.ts` comments.

## 3. demo/typescript modernization (no .cjs→.mjs)
- `actions/`, `services/`, `topics/` `tsconfig.json`: `module`/`moduleResolution` → `NodeNext`, `target`/`lib` → ES2022, removed stale `./types` typeRoots.
- Updated `README.md` + per-folder READMEs (ES2022 wording, removed false "local type definitions" claims).

## 4. ESM fix for benchmarks (4 files)
`benchmark/rclnodejs/**/*.js` used bare `require()` under the root `"type": "module"` and threw `ReferenceError: require is not defined`. Converted to ESM (`import { program } from 'commander'`, `import rclnodejs from '../../../index.js'`). Verified against ROS 2 Jazzy: topic + service pairs run with no exceptions.

## 5. CommonJS island fix for jsdoc tooling (1 file)
Added `tools/jsdoc/package.json` = `{"type":"commonjs"}` so `build-index.js`, `regenerate-published-docs.js`, and the jsdoc template `publish.js` (which must keep that exact name and be CJS) load correctly. Without it, `npm run docs` aborts with "Unable to load template: require is not defined". Verified: `n... (continued)

2043 of 2401 branches covered (85.09%)

Branch coverage included in aggregate %.

16688 of 18133 relevant lines covered (92.03%)

227.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27326505326.1 11 Jun 2026 06:40AM UTC 65
91.22
GitHub Action Run
Source Files on build 27326505326
  • Tree
  • List 65
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27326505326
  • 10a5ef4f on github
  • Prev Build on develop (#27263579073)
  • Next Build on develop (#27329150330)
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

© 2026 Coveralls, Inc