Skip to content

v1.1.0 — modernization

Latest

Choose a tag to compare

@ambicuity ambicuity released this 05 May 16:13
0d2adc5

[1.1.0] — 2026-05-05

Added

  • Dual ESM / CJS package. Modern ESM consumers (Vite, Next, Bun) can import the library natively without CJS interop warnings. CommonJS require() continues to work unchanged. The bin entrypoint stays CJS for shebang simplicity.
  • @deprecated JSDoc on v2.0-bound overloads. Callback-style overloads (e.g. cpu(callback)) and positional-arg overloads (fsSize(drive), networkInterfaces(rescan, defaultString)) carry IDE strikethrough — no runtime change, no breaking change, signals that the options-object form is the path forward.
  • Per-call diagnostic scope via AsyncLocalStorage. Concurrent envelope-mode calls no longer bleed each other's diagnostic records into their envelopes. si.diagnostics() and onDiagnostic() listener semantics are unchanged.
  • PowerShell child cleanup on Windows. Persistent PowerShell process registers process.on('exit') / SIGINT / SIGTERM cleanup hooks on first spawn; quick CLI exits no longer leak the child.
  • Fixture-tested macOS parsers for df -kP, diskutil list, ifconfig, route get default, netstat -rn, networksetup (hardware ports / airport network / airport power), ps -axo, and system_profiler (displays, memory). All parsers are pure functions in src/parsers.ts with authentic captures under test/fixtures/darwin/. See docs/platform-support.md for the full table.
  • fsSize() macOS path now consumes parseDfDarwin from src/parsers.ts. Output shape unchanged; verified via before/after diff of {fs, type, mount} tuples on the dev machine.
  • API codegen pipeline. The 50 wrapped public functions in src/index.ts are now generated from scripts/api-registry.ts via scripts/codegen-public-api.ts → src/index.generated.ts. wrapInspectFunction / withInspectOptions / normalizeOptions extracted to src/wrap.ts. npm run codegen:api:check is a CI gate.
  • Bluetooth SIG vendors codegen. src/bluetoothVendors.ts is now regenerated from the canonical Bluetooth SIG company-identifiers YAML (4019 entries, was hand-maintained at 1136 entries — nearly 3000 newer entries gained). Weekly cron (.github/workflows/refresh-bluetooth-vendors.yml) opens a PR if upstream changes; PR-time freshness check is continue-on-error so it doesn't block unrelated work.
  • Lint warning ratchet. .lint-warning-baseline (single integer) replaces the 200-warning shell ceiling in CI. The baseline can only ratchet down — every increase fails CI or requires an explicit baseline bump documented in the PR.
  • Concurrency test for diagnostics scope (test/diagnostics-concurrency.test.ts).
  • API shape test (test/api-shape.test.ts) asserting the 69-export public surface has no surprise additions or removals.
  • Windows-only PowerShell cleanup smoke test (test/powershell-cleanup.test.ts).

Changed

  • src/index.ts shrunk from 708 to ~340 lines; the API surface is now generated, not hand-written.
  • Lint warning baseline dropped from 200 (previous shell ceiling) to 10 after Biome auto-fixes (useParseIntRadix, noUnusedImports, noUnusedFunctionParameters, etc.).
  • CI now runs lint:check (baseline ratchet), codegen:api:check, and codegen:bluetooth-vendors:check (soft gate). The Node-18 runtime-smoke job reads the expected version from the tarball filename, so version bumps no longer require editing the workflow YAML.

Notes

  • All changes are fully backward-compatible. No public exports were removed or changed in shape. Every existing callback overload and positional arg keeps working.
  • Linux/Windows/BSD parser extraction is intentionally deferred to follow-up branches that capture authentic outputs from those hosts (no fabricated fixtures from man pages).