Skip to content

deps: bump @cldmv/droidsock to 2.2.1 and drop the slothlet override - #111

Merged
Shinrai merged 2 commits into
nextfrom
deps/droidsock-2.2.1
Nov 22, 2026
Merged

Shinrai merged 2 commits into
nextfrom
deps/droidsock-2.2.1

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

droidsock 2.2.1 keeps slothlet below 3.24.0 (CLDMV/slothlet#708), so the repo's own slothlet override goes away. Adds the line to the v2.3.0 changelog.

@cldmv-bot cldmv-bot Bot added ! deps → next v4 flow: deps contributor PR targeting the next integration branch type: dependencies Relates to dependency updates, version bumps, or package management type: documentation Relates to docs, README updates, guides, or inline code comments labels Nov 22, 2026
@cldmv-bot cldmv-bot Bot changed the title deps: bump @cldmv/droidsock to 2.2.1 and drop the slothlet override docs: link the droidsock 2.2.1 changelog line to its PR Nov 22, 2026
@cldmv-bot

cldmv-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Auto-normalized PR title: rewrote PR title to match the highest-priority commit type (docs).

  • Before: deps: bump @cldmv/droidsock to 2.2.1 and drop the slothlet override
  • After: docs: link the droidsock 2.2.1 changelog line to its PR

If this isn't what you want, edit the title — the normalizer won't re-fire as long as the title stays conventional.

@Shinrai Shinrai changed the title docs: link the droidsock 2.2.1 changelog line to its PR deps: bump @cldmv/droidsock to 2.2.1 and drop the slothlet override Nov 22, 2026
@Shinrai
Shinrai merged commit cf346cc into next Nov 22, 2026
29 checks passed
@cldmv-bot
cldmv-bot Bot deleted the deps/droidsock-2.2.1 branch November 22, 2026 09:09
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 -->

![coverage](https://img.shields.io/badge/coverage-93.4%25-brightgreen?style=for-the-badge&logo=vitest&logoColor=white)

| 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

! deps → next v4 flow: deps contributor PR targeting the next integration branch type: dependencies Relates to dependency updates, version bumps, or package management type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant