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

node-opcua / node-opcua / 26028346020
92%

Build:
DEFAULT BRANCH: master
Ran 18 May 2026 03:57PM UTC
Jobs 1
Files 1225
Run time 3min
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

18 May 2026 10:37AM UTC coverage: 92.042% (+0.007%) from 92.035%
26028346020

push

github

erossignon
chore: use randomBytes from node-opcua-utils everywhere

Convention: in node-opcua, `randomBytes` is imported from
`node-opcua-utils`, never from `node:crypto` or `crypto`. The utils
package provides Node and browser implementations behind one API, so
the same import works in both runtimes and any future swap of the
CSPRNG primitive happens in one place.

Sweeps every active call site:
- Source (browser-bundle critical): node-opcua-client (opcua_client_impl,
  inline require in client_base_impl), node-opcua-secure-channel (client
  + server secure-channel layers).
- Source (server-side, consistency): node-opcua-address-space,
  node-opcua-server (opcua_server + server_session),
  node-opcua-server-configuration/file_transaction_manager.
- Tests: node-opcua-basic-types, node-opcua-file-transfer,
  node-opcua-end2end-test (2 files), node-opcua-secure-channel (2
  files), node-opcua-server, node-opcua-server-configuration (2 files).

Adds `node-opcua-utils` to dependencies where missing:
- node-opcua-server-configuration: runtime dep + tsconfig project ref.
- node-opcua-basic-types, node-opcua-file-transfer, node-opcua-end2end-test:
  devDependency (test-only usage).

Remaining `randomBytes from "node:crypto"` is a single line: the
re-export in `packages/node-opcua-utils/source/random_bytes.ts`. That's
the canonical chokepoint.

Follow-up: codify the convention with a Biome/ESLint `no-restricted-imports`
rule against `randomBytes` from `node:crypto`/`crypto`.

Verification:
- All affected source-side packages build clean.
- `pnpm --filter node-opcua-client-browser run test:e2e`: 1 passing.
- `pnpm --filter node-opcua-client-browser run test:unit`: 21 passing.

18431 of 21732 branches covered (84.81%)

10 of 10 new or added lines in 7 files covered. (100.0%)

5 existing lines in 1 file now uncovered.

164018 of 178200 relevant lines covered (92.04%)

433826.33 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
85.56
-1.85% packages/node-opcua-client/source/client_session_keepalive_manager.ts
Jobs
ID Job ID Ran Files Coverage
1 26028346020.1 18 May 2026 03:57PM UTC 1225
92.04
GitHub Action Run
Source Files on build 26028346020
  • Tree
  • List 1225
  • Changed 13
  • Source Changed 11
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26028346020
  • 5b2631b6 on github
  • Prev Build on master (#25984182338)
  • Next Build on master (#26079274709)
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