Repository navigation
test: run the suite against the build with test:dist - #96
Merged
Merged
Conversation
test:dist builds the package and runs the vitest suite against dist/ (`--mode=dist` leaves the -dev export condition off), and `npm test` and `ci:coverage` now include it. The tests import the package by name so the condition decides whether they run on src/ or dist/, and tests/resolve.test.vitest.mjs checks the name resolved to the expected tree. The source-level entry tests are skipped in dist mode.
Shinrai
pushed a commit
that referenced
this pull request
Nov 8, 2026
test:dist builds and runs the vitest suite with --mode=dist, so the tests that import the package by name run against dist/. A resolve test checks the import landed on the right tree.
Shinrai
added a commit
that referenced
this pull request
Nov 8, 2026
Swaps @devicefarmer/adbkit for @cldmv/droidsock, so the adb binary and server are no longer needed and the postinstall adb check is gone. maintainConnection now uses droidsock's heartbeat and auto-reconnect; connectionCheckInterval is ignored. engines.node goes to >=22.15.0 to match droidsock. Rebased onto next after #96, and the new tests import the package by name so test:dist covers them. slothlet is pinned to 3.22.1 through overrides because 3.24.0 breaks real sockets (CLDMV/slothlet#708). That only affects this repo's install, but the release has to wait for 3.24.1 and a follow-up PR that drops the override.
cldmv-bot Bot
added a commit
that referenced
this pull request
Nov 22, 2026
# `@cldmv/node-android-tv-remote` v2.3.0 Changelog **Release Date**: November 2026 **Release Type**: Minor **Branch**: `release/2.3.0` --- ## Overview Version 2.3.0 replaces `@devicefarmer/adbkit` with `@cldmv/droidsock`, which speaks the ADB protocol itself. The `adb` command-line tool and its server are no longer needed to drive a device, and the install-time check for `adb` is gone. Keeping the connection alive also moves to droidsock: `maintainConnection` now turns on its heartbeat and its automatic reconnect with backoff, in place of the remote's own heartbeat timer and periodic `adb devices` check. The exported API (`createRemote`, `createAndroidTVRemote` and the default export, from both `import` and `require()`) is unchanged. `engines.node` rises from `>=22.12.0` to `>=22.15.0`, the floor droidsock declares. See [Requirements](#-requirements) and the upgrade notes. --- ## 📦 Requirements ### Node.js `>=22.15.0` is now required ([#95](#95)) `engines.node` goes from `>=22.12.0` to `>=22.15.0`, matching `@cldmv/droidsock` 2. `require()` loads the ESM build through Node's `require(esm)`, which runs without warnings on that floor, so the message `require()` throws on an older Node.js now names `>=22.15.0`. ### The `adb` binary is optional ([#95](#95)) The remote no longer shells out to `adb` or needs its server running. Install `adb` only for your own use, such as the `setup-device` steps in the README. The `postinstall` script that printed install instructions when `adb` was missing has been removed, along with `scripts/postinstall.mjs` in the published package. --- ##⚠️ Behavior changes ### Connection upkeep comes from droidsock ([#95](#95)) With `maintainConnection` on (the default), the remote enables droidsock's heartbeat (every `heartbeatInterval` ms, 20 seconds by default) and its automatic reconnect with backoff. A dropped connection is noticed by the socket and the heartbeat and reconnected without waiting for a polling interval. Reconnect attempts, successful reconnects and giving up are reported through the `log` channel, and the connected state follows the socket. - `connectionCheckInterval` is deprecated and ignored. - `getConnectionStatus()` returns `"connected"` or `"disconnected"`; it no longer returns `"unknown"`. - With `autoConnect` off, a command on a remote that never connected rejects with `Device not connected`. ### Calls without a droidsock equivalent run through `shell` ([#95](#95)) `screencap()` captures the PNG in memory over `shell`, and `waitBootComplete()` polls `sys.boot_completed`. Each poll gets only the time left before the timeout, so a hung device can't keep `waitBootComplete()` waiting past it. --- ## 🧪 Tests - The adb-client and event tests use a droidsock mock, and a new test runs the real droidsock against a fake device on a local socket ([#95](#95)). - `npm run test:dist` builds the package and runs the suite against `dist/`; `npm test` now includes it. The tests import the package by name, and a resolve test checks each run loaded the tree it meant to ([#96](#96)). - The vitest config sets the `node-android-tv-remote-dev` condition with `devCondition()` from `@cldmv/configs`. The `test.nodeOptions` it used before isn't a Vitest option, so the condition never reached the test workers ([#93](#93)). ## 🔧 CI & tooling - The dev-only `dev/tools/adb-response.mjs` tool, which was built on adbkit, has been removed ([#95](#95)). ## 📚 Documentation - The README requirements list Node.js 22.15.0, and the ADB install section is marked optional ([#95](#95)). - The README describes `npm run test:dist` ([#96](#96)). - The `heartbeatInterval` JSDoc gives the real 20-second default ([#95](#95)). - **NEW:** [docs/changelog/v2/v2.3.0.md](https://github.com/CLDMV/node-android-tv-remote/blob/v2.3.0/docs/changelog/v2/v2.3.0.md) — this changelog. ## 🔧 Dependencies Runtime: - `@devicefarmer/adbkit` `^4.0.1` removed, `@cldmv/droidsock` added ([#95](#95)). adbkit's `commander`, `node-forge`, `split`, `adbkit-logcat` and `adbkit-monkey` are no longer installed. - `@cldmv/droidsock` `^2.2.0` → `^2.2.1` ([#111](#111)). droidsock 2.2.1 keeps `@cldmv/slothlet` below 3.24.0, whose stand-ins for sockets made `connect()` throw `Illegal invocation` ([CLDMV/slothlet#708](CLDMV/slothlet#708)). The `@cldmv/slothlet` override this repository carried for its own install is removed. Development only: - `@cldmv/configs` `^1.3.0` → `^1.4.0`, for `devCondition()` ([#93](#93)). --- ## Upgrade notes - **Node.js `>=22.15.0` is required.** On Node.js 22.12 to 22.14, stay on [v2.2.1](https://github.com/CLDMV/node-android-tv-remote/blob/v2.3.0/docs/changelog/v2/v2.2.1.md). - You can uninstall `adb` if nothing else needs it. - Drop `connectionCheckInterval` from your config; it has no effect. Use `heartbeatInterval` to tune how fast a dead connection is noticed. - Code that checked `getConnectionStatus()` for `"unknown"` can drop that branch. <details> <summary>👥 Contributors</summary> - @Shinrai </details> --- <!-- coverage-start -->  | Metric | Coverage | |--------|----------| | Statements | 95.3% | | Branches | 85.3% | | Functions | 97.6% | | Lines | 95.4% | *Avg: **93.4%** · `00d3d51` · Node lts/** <!-- coverage-end --> <!-- co-authors --> Co-authored-by: Shinrai <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
No bug fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
👥 Contributors