Skip to content

test: set the droidsock-dev condition with devCondition() and drop the no-op test.nodeOptions - #103

Merged
Shinrai merged 1 commit into
nextfrom
test/dev-condition
Nov 5, 2026
Merged

Shinrai merged 1 commit into
nextfrom
test/dev-condition

Conversation

@cldmv-bot

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

Copy link
Copy Markdown
Contributor

test.nodeOptions isn't a Vitest option, so the condition never reached the workers. This switches the config to devCondition() from @cldmv/configs 1.4.0, which sets the resolve/ssr conditions and test.execArgv. The slothlet 3.24 bump isn't in here, it's blocked on CLDMV/slothlet#708.

…e no-op test.nodeOptions

test.nodeOptions isn't a Vitest option, so it never reached the workers. devCondition() from @cldmv/configs sets the resolve/ssr conditions and test.execArgv.
@cldmv-bot cldmv-bot Bot added ! test → next v4 flow: test contributor PR targeting the next integration branch type: dependencies Relates to dependency updates, version bumps, or package management labels Nov 5, 2026
@Shinrai
Shinrai merged commit b592a69 into next Nov 5, 2026
31 checks passed
@cldmv-bot
cldmv-bot Bot deleted the test/dev-condition branch November 5, 2026 01:55
cldmv-bot Bot added a commit that referenced this pull request Nov 22, 2026
# DroidSock v2.2.1 Changelog

**Release Date**: November 2026
**Release Type**: Patch
**Branch**: `release/2.2.1`

---

## Overview

v2.2.1 keeps `@cldmv/slothlet` below 3.24.0. slothlet 3.24.0 hands sockets back to droidsock as proxies, so `device.connect()` throws `TypeError: Illegal invocation` on every install that resolves it. The `^3.22.1` range in v2.2.0 allowed 3.24.0, so a fresh install of v2.2.0 picks it up today; v2.2.1 narrows the range to `>=3.22.1 <3.24.0`.

No droidsock code changed. The rest of the release is test and CI work: the Vitest suite now also runs against the built `dist/`, and the dev export condition actually reaches the test workers.

---

## 🐛 Bug Fixes

### `@cldmv/slothlet` capped below 3.24.0 ([#112](#112))

From 3.24.0, slothlet hands out a proxy for a `net.Socket` (or any `node:stream` object) that a module returns, and native calls on it fail with `TypeError: Illegal invocation` ([slothlet#708](CLDMV/slothlet#708)). droidsock's connection module creates the socket and the device module calls `socket.setKeepAlive()` on it, so every `device.connect()` threw. 3.23.0 is not affected.

The dependency range moves from `^3.22.1` to `>=3.22.1 <3.24.0`. The lockfile stays on 3.22.1. No fixed 3.24.x is planned, because slothlet's next release is 4.0.0; moving to slothlet 4 is separate work.

Packages that depend on droidsock and pinned slothlet with an npm `overrides` entry to work around this can drop the override once they require `@cldmv/droidsock` `^2.2.1`.

## 🧪 Tests

- The Vitest config sets the `droidsock-dev` condition with `devCondition()` from `@cldmv/configs` 1.4.0. The old `test.nodeOptions` setting isn't a Vitest option, so the condition never reached the test workers ([#103](#103)).
- `npm run test:dist` builds `dist/` and runs the Vitest suite against it. `npm test` and `ci:coverage` include it ([#107](#107)).
- The device tests compare leaves by `host:port` instead of object identity, and the shell-control tests check that `stop()` reaches the real control. From slothlet 3.23, `devices.get()` and `devices.list()` return each module's own view of the same leaf, so identity checks failed although the device was the same ([#106](#106)).

## 🔧 CI & tooling

- New `sync-release-notes.yml` companion workflow from the v4 template, unchanged. It keeps GitHub Release bodies in step with the per-version changelog files and creates missing version tags ([#110](#110)).

## 📚 Documentation

- **NEW:** [docs/changelog/v2/v2.2.1.md](https://github.com/CLDMV/droidsock/blob/v2.2.1/docs/changelog/v2/v2.2.1.md): this changelog.
- `docs/API.md` and the `devices.get()` JSDoc no longer promise "the exact same object" across a disconnect and reconnect; they say the same leaf or device, which is what callers can rely on ([#106](#106)).
- README: the source-layout section mentions `npm run test:dist` ([#107](#107)).
- README **✨ What's New** updated for v2.2.1.

## 🔧 Dependencies

Runtime:

- `@cldmv/slothlet` `^3.22.1` → `>=3.22.1 <3.24.0`, locked at 3.22.1 (see Bug Fixes).

Dev-only:

- `@cldmv/configs` `^1.3.0` → `^1.4.0` ([#103](#103)).

---

## Upgrade notes

- Drop-in for v2.2.0; the API and runtime code are unchanged.
- If your install resolved `@cldmv/slothlet` 3.24.0 under v2.2.0, updating to v2.2.1 moves it back to 3.23.x or 3.22.x and `device.connect()` works again.



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

---

<!-- coverage-start -->

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

| Metric | Coverage |
|--------|----------|
| Statements | 93.4% |
| Branches   | 85.8% |
| Functions  | 94.7% |
| Lines      | 95.0% |

*Avg: **92.2%** · `96329ba` · 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

! test → next v4 flow: test contributor PR targeting the next integration branch type: dependencies Relates to dependency updates, version bumps, or package management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant