deps: bump @cldmv/fix-headers to 2.2.0 - #52
Merged
Merged
Conversation
Bumps @cldmv/fix-headers from 2.1.4 to 2.2.0. No file headers changed.
Raises the range from ^1.2.0 (locked 1.2.0) to ^1.2.4. Configs 1.2.4 sets forceAuthorUpdate and forceLastModifiedAuthorUpdate to false, so with fix-headers 2.2.0 @author is never rewritten and @last modified by changes only on real content edits. Ran fix:headers under the new config: 0 files restamped.
Shinrai
approved these changes
Oct 5, 2026
cldmv-bot Bot
added a commit
that referenced
this pull request
Oct 5, 2026
# @cldmv/node-android-tv-remote v2.1.8 Changelog **Release Date**: October 2026 **Release Type**: Patch **Branch**: `release/2.1.8` --- ## Overview Version 2.1.8 makes remotes independent of each other and stops an unheard `error` event from crashing the process. Each remote now has its own event emitter, so two TVs no longer see each other's events. When no `error` listener is attached, an error is logged instead of thrown, and the failing call still reports it. It also restores `npm run setup-device`, which had been broken since v2.1.0, and relicenses the package under Apache-2.0. The dev tooling for file headers moves to `@cldmv/fix-headers` 2.2.0 and `@cldmv/configs` 1.2.4. --- ## 🐛 Bug Fixes ### Each remote has its own event emitter ([#46](#46), fixes [#43](#43)) The event emitter and its helper functions were created once at module level and shared by every remote returned by `createRemote()`. With two TVs, listeners on one remote received the other remote's connect, disconnect, log and error events, and `off()` on one affected the other. Every remote now gets its own emitter. ### An `error` with no listener no longer crashes the process ([#46](#46), fixes [#44](#44)) The remote is an event emitter, and Node.js throws when `error` is emitted with no listener. Even a failed auto-connect inside `createRemote()`, before the caller could attach a listener, crashed the process. Now `error` is emitted only when a listener is attached. Otherwise the error goes out as a `log` event with level `"error"` (the `Error` is in `data.error`) and to `NODE_DEBUG=android-tv-remote`. The failing call still reports it: commands reject and `initPromise` rejects. A failed auto-connect is no longer an unhandled promise rejection for callers who never await `initPromise`. `connect()` and `disconnect()` still resolve with the `Error` rather than rejecting, as before. ### `npm run setup-device` works again ([#45](#45), fixes [#42](#42)) `scripts/setup-device.mjs` imported `src/lib/adb/setup.mjs`, which was deleted in v2.1.0, so the script failed with a module-not-found error, and it was still published. It now runs the setup steps through the v2 remote: connect, apply the keep-awake settings with `setSettings`, wake the device with `ensureAwake`, go to the home screen, and always disconnect, even when a step fails. All three scripts in `scripts/` now run their command only when executed directly and export `main()`, so importing them has no side effects. --- ## 📄 License The package is relicensed from MIT to Apache-2.0 ([#41](#41)). The repository now has a `LICENSE` file; before this it had none, although `package.json` declared MIT. --- ## 🧪 Tests - `tests/scripts.test.vitest.mjs` imports every file under `scripts/`, so a dangling import fails CI, and tests the setup flow against a fake remote. - `tests/events.test.vitest.mjs` mocks `@devicefarmer/adbkit`, so no real ADB or network connections are made. It checks that two remotes are independent, and that errors with and without a listener are reported correctly for `connect`, `keyboard.key` and auto-connect. - Line coverage rises from about 13% to about 23%. --- ## 📚 Documentation - **NEW:** [docs/changelog/v2/v2.1.8.md](./v2.1.8.md): this changelog. - **NEW:** changelog files for every earlier release, v1.0.0 through v2.1.7, under [docs/changelog/](../) ([#41](#41)). - README restructured to the CLDMV layout: badges, What's New, Installation with Node.js requirements, Documentation index and Links ([#41](#41)). It also fixes the install and import examples, which used the wrong package name (`android-tv-remote`). - The README now says an `error` listener is optional and describes where unheard errors go ([#48](#48)). --- ## 🔧 Dependencies Both are dev dependencies and affect only the `npm run fix:headers` script, which extends `@cldmv/configs/fix-headers.json`. Only `package.json` and the lockfile changed; no file headers were restamped and the published package is unaffected. - `@cldmv/fix-headers` `^2.1.1` → `^2.2.0`, in two steps. 2.1.4 ([#50](#50)) no longer writes a JavaScript comment into JSON or Markdown files, processes every repeated `--input`, and never walks dependency folders such as `node_modules`. 2.2.0 ([#52](#52)) makes `@Last modified by` follow edits to a file's content only, so a run that merely rewrites a header keeps the recorded editor. - `@cldmv/configs` `^1.2.0` → `^1.2.4` ([#52](#52)). The shared fix-headers config now sets `forceAuthorUpdate` and `forceLastModifiedAuthorUpdate` to `false`, so `@Author` keeps the file's creator and `@Last modified by` changes only with real content edits. The 1.2.1 and 1.2.2 releases of that package only changed its own CI. --- ## Upgrade notes - No breaking changes: drop-in for [v2.1.7](./v2.1.7.md). - If you ran several remotes and relied on one remote's listeners also receiving another remote's events, that was the bug fixed here; attach listeners to each remote. - Code that kept the process alive only because an unheard `error` crashed it no longer crashes: listen for `error`, or for `log` events with level `"error"`, if you want to act on failures without awaiting the call. - The license is now Apache-2.0. <details> <summary>👥 Contributors</summary> - @Shinrai </details> --- <!-- coverage-start -->  | Metric | Coverage | |--------|----------| | Statements | 23.2% | | Branches | 20.3% | | Functions | 40.6% | | Lines | 23.7% | *Avg: **26.9%** · `f5dcd8f` · Node lts/** <!-- coverage-end --> <!-- co-authors --> Co-authored-by: Shinrai <Shinrai@users.noreply.github.com>
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
🔧 Other Changes
No other changes
👥 Contributors