release: v1.0.0 - make the default export a callable quick path, drop connect/listDevices
DroidSock v1.0.0 Changelog
Release Status: First stable release
Overview
v1.0.0 is DroidSock's first tagged release. The library itself - a from-scratch Node.js implementation of the Android Debug Bridge (ADB) wire protocol, built on @cldmv/slothlet - already had a working protocol implementation (connection handshake, RSA authentication, shell execution, stream multiplexing, shell-based file operations); this release is what turns that into a real package: a proper test suite with measured coverage, a full CI/release pipeline, a real dist/ build, and an API surface that's been reviewed and cleaned up rather than just organically grown.
🚨 Breaking Changes
Default export is now a callable quick path; connect()/listDevices() are gone
The previous top-level connect() and listDevices() exports were removed - their names risked colliding with other modules a consumer might already have in scope, and connect() returned a raw device rather than the full api. The default export is now itself the quick path:
// v0.x - removed
import { connect } from "@cldmv/droidsock";
const device = await connect(host, port);
// v1.0.0 - the default export is the quick path
import droidsock from "@cldmv/droidsock";
const api = await droidsock(); // same function as createDroidSock(options)
const device = await api.device.connect(host, port);droidsock(options) and createDroidSock(options) are the exact same function - droidsock is just the friendlier name for the common case of not needing to name the factory explicitly. Both are available from the default export, and createDroidSock is also available as a named export for callers who prefer it.
✨ Highlights
- Real test suite and measured coverage - a from-scratch Vitest suite covering
auth,utils,config,log, and the shell-basedfilesoperations, wired through@cldmv/vitest-runnerwith v8 coverage reporting and a live coverage badge. Found and fixed a genuine coverage-attribution bug along the way: slothlet's per-instance dynamic-import URLs were making some code read as uncovered even though it executed (fixed by inlining@cldmv/slothletinto Vitest's module graph). - Full CLDMV v4 CI/release automation - the complete workflow set (CI, CodeQL, Dependency Review, Scorecard, coverage badge, lint/format autofix, the
next/hotfixesstaging-branch release flow), a local pre-commit hook, and npm Trusted Publishing. @cldmv/slothletbumped to 3.x, including switching off the experimental"live"runtime mode to the stable"async"default.- A real
dist/build pipeline (build.mjs) - copiessrc/todist/, optionally strips comments/whitespace via esbuild, and re-prepends the Apache license header - replacing a build script that previously pointed at a file that didn't exist. - The leaked ADB RSA keypair was purged from the repository's history entirely (not just the working tree) before this repository went public. A freshly installed copy now generates its own key on first use instead of shipping a real one.
🐛 Notable Fixes
- Two
auth.mjscoverage-ignore comments were removed after empirically verifying they were wrong: the code paths they guarded are reachable on current Node via any non-RSA key type (DSA, Ed25519, and others), not just "older Node versions" as originally assumed. Real tests using actual DSA and Ed25519 keys now cover them. auth.mjswas missing theselfruntime import it needed for its own debug logging - eighteen call sites were silently broken.utils.retry()previously rejected with a bareundefinedand never called the wrapped function at all when given a negativemaxRetries- it now clamps to0(still runs the function once; a real failure now propagates as a realError) and warns.devcheck.mjs's development-environment check could previously report success fromNODE_ENV=developmentalone, without theNODE_OPTIONS=--conditions=droidsock-devflag that actually controls which build the package resolves to - it now checks the flag that matters.
📋 Known Limitations
push/pull (real binary file transfer via the ADB SYNC sub-protocol) are not implemented yet - they throw explicitly rather than silently failing. list/stat also threw at this version due to a leftover reference to a nonexistent module; see v1.1.0 for the fix - both are implemented via existing shell commands and needed no SYNC protocol work at all. #1 tracks capturing a real-device session to build accurate protocol-level mocks for connection/device/stream/shell - it was never about push/pull/list/stat.