@cldmv/droidsock 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,18 +25,18 @@ It talks to devices directly over TCP, with no `adb` binary or ADB server in bet
25
25
 
26
26
  ## ✨ What's New
27
27
 
28
- ### Latest: v2.2.0 (November 2026)
28
+ ### Latest: v2.2.1 (November 2026)
29
29
 
30
- - **CLDMV library layout** - the entries are `src/index.mjs` and `src/index.cjs`, tsup builds `dist/`, and the package ships `dist/` and `types/`. The ADB API is unchanged. `@cldmv/droidsock/main` is now a deprecated alias of the root that prints a one-time `DeprecationWarning` (code `CLDMV_DROIDSOCK_MAIN`); import `@cldmv/droidsock` instead. `@cldmv/slothlet` moves to `^3.22.1` so `require()` keeps working with the static entry ([#91](https://github.com/CLDMV/droidsock/issues/91), [#93](https://github.com/CLDMV/droidsock/pull/93)).
31
- - **Runtime floor unchanged** - `engines.node` stays `>=22.15.0` for `import` and `require()`. Developing the package needs Node.js 22.22.0, now declared in `devEngines`, which doesn't affect installs ([#100](https://github.com/CLDMV/droidsock/pull/100)).
32
- - [View full v2.2.0 Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.2.0.md)
30
+ - **`@cldmv/slothlet` kept below 3.24.0** - slothlet 3.24.0 hands sockets back as proxies, so `device.connect()` threw `TypeError: Illegal invocation` on any install that resolved it ([slothlet#708](https://github.com/CLDMV/slothlet/issues/708)). The range is now `>=3.22.1 <3.24.0`; no droidsock code changed ([#112](https://github.com/CLDMV/droidsock/pull/112)).
31
+ - **Suite runs against the build** - `npm run test:dist` runs the Vitest suite against `dist/`, and `npm test` includes it ([#107](https://github.com/CLDMV/droidsock/pull/107)).
32
+ - [View full v2.2.1 Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.2.1.md)
33
33
 
34
34
  ### Recent Releases
35
35
 
36
+ - **v2.2.0** (November 2026) - CLDMV library layout (`src/index.mjs` / `src/index.cjs` entries, tsup-built `dist/`); `@cldmv/droidsock/main` is a deprecated alias of the root ([Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.2.0.md))
36
37
  - **v2.1.0** (October 2026) - device lifecycle events, opt-in auto-reconnect with backoff, TCP keepalive and an optional heartbeat; `engines.node` rose to `>=22.15.0` ([Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.1.0.md))
37
38
  - **v2.0.3** (October 2026) - `index.cjs` loads the ESM entry with a plain `require()` and fails clearly without `require(esm)`; `@cldmv/droidsock/devcheck` is no longer exported or published ([Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.0.3.md))
38
39
  - **v2.0.2** (October 2026) - Dev tooling only: shared CLDMV fix-headers config and a required PR check that never reports as skipped, no runtime change ([Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.0.2.md))
39
- - **v2.0.1** (October 2026) - No runtime change, but `engines.node` rose to `>=22.12.0` (from `>=20.19.0`) to match the vitest 5 toolchain; also syncs the v4 workflows with the v4.29.2 templates ([Changelog](https://github.com/CLDMV/droidsock/blob/master/docs/changelog/v2/v2.0.1.md))
40
40
 
41
41
  📚 **For complete version history and detailed release notes, see the [docs/changelog/](https://github.com/CLDMV/droidsock/tree/master/docs/changelog/) folder.**
42
42
 
@@ -227,7 +227,7 @@ In a checkout, `@cldmv/droidsock` resolves to `dist/` by default. The `droidsock
227
227
  | `node --conditions=droidsock-dev app.mjs` | `src/index.mjs` |
228
228
  | `require("@cldmv/droidsock")` with the condition | `src/index.cjs` → `src/index.mjs` |
229
229
 
230
- Set it once per shell with `export NODE_OPTIONS=--conditions=droidsock-dev`. `npm test` runs the Vitest suite against `src/` (the Vitest config passes the condition) and then `npm run test:cjs`, which builds `dist/` and checks it with `node --test`.
230
+ Set it once per shell with `export NODE_OPTIONS=--conditions=droidsock-dev`. `npm test` runs the Vitest suite against `src/` (the Vitest config passes the condition) and then `npm run test:cjs`, which builds `dist/` and checks it with `node --test`, and `npm run test:dist` builds `dist/` and runs the Vitest suite against it (`npm test` includes both).
231
231
 
232
232
  ---
233
233
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cldmv/droidsock",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Complete Node.js implementation of the Android Debug Bridge (ADB) protocol",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -42,12 +42,13 @@
42
42
  "types:build": "tsc --project .configs/tsconfig.dts.jsonc",
43
43
  "build:ci": "npm run lint && npm run format:check && npm run types:build && npm run build",
44
44
  "prepack": "npm run build",
45
- "test": "node tests/run-vitest.mjs && npm run test:cjs",
45
+ "test": "node tests/run-vitest.mjs && npm run test:cjs && npm run test:dist",
46
46
  "test:cjs": "npm run build && node --conditions=droidsock-dev --test tests/cjs/entry.test.cjs",
47
+ "test:dist": "npm run build && node tests/run-vitest.mjs --mode=dist",
47
48
  "test:watch": "vitest --config .configs/vitest.config.mjs",
48
49
  "test:types": "tsc --noEmit --project .configs/tsconfig.dts.jsonc",
49
50
  "coverage": "node tests/run-vitest.mjs --coverage-quiet && npm run test:cjs",
50
- "ci:coverage": "npm run coverage",
51
+ "ci:coverage": "npm run coverage && npm run test:dist",
51
52
  "lint": "eslint --config .configs/eslint.config.mjs .",
52
53
  "lint:fix": "eslint --config .configs/eslint.config.mjs . --fix",
53
54
  "format": "prettier --config .configs/.prettierrc --write .",
@@ -112,7 +113,7 @@
112
113
  "./dist/main.mjs"
113
114
  ],
114
115
  "devDependencies": {
115
- "@cldmv/configs": "^1.3.0",
116
+ "@cldmv/configs": "^1.4.0",
116
117
  "@cldmv/eslint-plugin-jsonv": "^1.0.17",
117
118
  "@cldmv/fix-headers": "^2.2.4",
118
119
  "@cldmv/jsonv": "^1.1.5",
@@ -132,7 +133,7 @@
132
133
  "vitest": "^5.0.5"
133
134
  },
134
135
  "dependencies": {
135
- "@cldmv/slothlet": "^3.22.1",
136
+ "@cldmv/slothlet": ">=3.22.1 <3.24.0",
136
137
  "@noble/curves": "^2.4.0",
137
138
  "selfsigned": "^5.5.0"
138
139
  },
@@ -10,7 +10,7 @@ export function list(): Array<Object>;
10
10
  * Looks up a device leaf - connected or currently disconnected - by
11
11
  * "host:port" string or by the leaf object itself (as returned by
12
12
  * device.connect()). Since disconnect() no longer unmounts a leaf, this
13
- * reliably re-resolves the SAME object across a disconnect/reconnect cycle;
13
+ * reliably re-resolves the same device across a disconnect/reconnect cycle;
14
14
  * it only returns undefined for a device that was never connected or has
15
15
  * since been forgotten via remove().
16
16
  * @param {string|Object} idOrLeaf - "host:port" (bracket the host for IPv6,