Skip to content

release: v2.1.7 - require the ESM entry directly and fail clearly on… - #40

Merged
cldmv-bot[bot] merged 4 commits into
masterfrom
next
Oct 3, 2026
Merged

cldmv-bot[bot] merged 4 commits into
masterfrom
next

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

coverage

Metric Coverage
Statements 12.7%
Branches 9.1%
Functions 20.2%
Lines 13.0%

Avg: 13.7% · 5ae55df · Node lts/*

Co-authored-by: Shinrai Shinrai@users.noreply.github.com

Shinrai and others added 4 commits October 3, 2026 10:39
…hout require(esm)

index.cjs used createRequire(__filename) to synchronously load index.mjs. That
idiom predates Node's native require(esm) and breaks bundlers (esbuild,
webpack) that don't follow a createRequire-constructed require the way they
follow a literal require() call.

- index.cjs: a plain require("./index.mjs") instead of createRequire. Where
  Node.js has no require(esm) (before 20.19 / 22.12) it now throws
  ERR_REQUIRE_ESM with a message pointing to import() instead of a bare
  loader error.
- index.mjs already had no top-level await, so no change was needed there.
- tests/cjs: node:test checks run by `npm test` and `npm run coverage` after
  Vitest: require() returns the same objects as import (type/identity only -
  createRemote opens a real ADB connection, so no call is made), and the
  version check fires when require(esm) is off.
index.mjs exports createAndroidTVRemote, but index.cjs only exposed the
default (createRemote), so require() callers could not reach it. The CJS
entry now carries every export the ESM entry has, and the CJS test checks it.
@cldmv-bot cldmv-bot Bot added ! release → master v4 flow: persistent next → master release PR (carries the next feature release) release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected area: tests Touches test files, fixtures, or test infrastructure type: dependencies Relates to dependency updates, version bumps, or package management labels Oct 3, 2026
@cldmv-bot

cldmv-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

🔒 Dependency Review

  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses
  • ✅ 0 denied package(s)
  • ✅ 0 package(s) with OpenSSF Scorecard score < 3

Full job summary

@cldmv-bot

cldmv-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Bundle size increased

File Raw Δ Raw Gzipped Δ Gzipped
index.cjs 1.5 kB +529 B (+52.4%) ⚠️ 787 B +273 B
index.mjs 898 B — 477 B —
scripts/postinstall.mjs 2.4 kB — 995 B —
scripts/setup-device.mjs 1.5 kB — 820 B —
scripts/wake-tv.mjs 1.3 kB — 730 B —
src/lib/android-tv-remote.mjs 66.3 kB — 15.6 kB —
Total 73.9 kB +529 B 19.3 kB +273 B

📊 Generated by bundle-size. Brotli sizes also measured but omitted from the table for brevity.

@cldmv-bot
cldmv-bot Bot merged commit c47b2b5 into master Oct 3, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Touches test files, fixtures, or test infrastructure ! release → master v4 flow: persistent next → master release PR (carries the next feature release) release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected 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