Skip to content

deps: bump @cldmv/fix-headers to 2.1.4 - #61

Merged
Shinrai merged 1 commit into
nextfrom
deps/fix-headers-2.1.4
Oct 4, 2026
Merged

Shinrai merged 1 commit into
nextfrom
deps/fix-headers-2.1.4

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

No bug fixes

📦 Dependencies

  • deps: bump @cldmv/fix-headers to 2.1.4 (8c8f1e7)

🔧 Other Changes

No other changes

👥 Contributors

Bumps @cldmv/fix-headers to 2.1.4 (JSON/Markdown/extension-less files never get a JS comment; dependency folders never walked). Ran fix:headers: 0 files restamped.
@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 labels Oct 4, 2026
@Shinrai
Shinrai merged commit 5f9f885 into next Oct 4, 2026
31 checks passed
@cldmv-bot
cldmv-bot Bot deleted the deps/fix-headers-2.1.4 branch October 4, 2026 05:20
cldmv-bot Bot added a commit that referenced this pull request Oct 5, 2026
# DroidSock v2.0.3 Changelog

**Release Date**: October 2026
**Release Type**: Patch
**Branch**: `release/2.0.3`

---

## Overview

v2.0.3 cleans up the CommonJS entry and the published file list. `index.cjs` now loads the ESM entry with a plain `require()`, which bundlers can follow, and fails with a clear message on Node.js versions that can't `require()` ES modules. The ESM entry and the API itself are unchanged.

The release also stops publishing `devcheck.mjs`, a source-checkout-only development check, and removes its `./devcheck` subpath export. Removing an export is technically a breaking change despite this being a patch release, so it's listed under Breaking Changes below. In practice the module did nothing in an installed copy of the package.

---

## 💥 Breaking Changes

### `@cldmv/droidsock/devcheck` is no longer exported or published ([#58](#58))

`package.json` no longer lists a `./devcheck` export, and `devcheck.mjs` and `types/devcheck.d.mts` are no longer in the published files. Importing `@cldmv/droidsock/devcheck` now fails with `ERR_PACKAGE_PATH_NOT_EXPORTED`.

The module was never part of the documented API. It has no exports; its only job is to warn a developer working in a source checkout who forgot to set `NODE_OPTIONS=--conditions=droidsock-dev`. It only acts when a `src/` folder sits next to it, and the published package has no `src/`, so importing it from an installed copy did nothing. `index.mjs` still loads it fire-and-forget and already tolerates it being missing, so the main entry is unaffected.

**Upgrade step:** if anything imports `@cldmv/droidsock/devcheck`, delete that import. Nothing replaces it, because it never did anything outside this repository.

## 🐛 Bug Fixes

### Require the ESM entry directly, and fail clearly without `require(esm)` ([#58](#58))

`index.cjs` used `createRequire(__filename)` to load `index.mjs`. That idiom predates Node's native `require(esm)`, and bundlers such as esbuild and webpack don't follow a `createRequire`-constructed `require` the way they follow a literal `require()` call, so a CommonJS build that bundled droidsock could miss the ESM entry.

- `index.cjs` now calls `require("./index.mjs")` directly and exports the same functions as before (`module.exports` is the `droidsock` quick path, with `createDroidSock`, `DroidSock`, `ADB` and `AndroidDebugBridge` as properties).
- On a Node.js version without `require(esm)` (before 20.19.0, or 22.0.0 to 22.11.x), `index.cjs` throws an `ERR_REQUIRE_ESM` error whose message names the supported versions and points to `import()`, instead of a bare loader error. The package's `engines.node` is already `>=22.12.0`, so this only matters for installs that ignore `engines`.
- `index.mjs` already avoided top-level `await`, so it needed no change.
- New `tests/cjs/entry.test.cjs` checks run under Node's own test runner after Vitest, from both `npm test` and `npm run coverage` (through the new `test:cjs` script). They check that `require()` returns the same functions as `import`, and that the version check fires when `require(esm)` is turned off. They don't call `droidsock()`, since that opens a real ADB connection.

## 🔧 CI & tooling

- `bundle-size.yml` no longer lists the `devcheck` files in `dist_paths`, matching the new published file list ([#58](#58)).

## 📚 Documentation

- **NEW:** [docs/changelog/v2/v2.0.3.md](./v2.0.3.md): this changelog.
- **NEW:** backfilled [v1.1.1](../v1/v1.1.1.md), [v2.0.1](./v2.0.1.md) and [v2.0.2](./v2.0.2.md).
- README restructured to the standard CLDMV layout, with a new Requirements section that states the Node.js floor for `import` and `require()`.

## 🔧 Dependencies

Both changes are to development dependencies; the package has no runtime dependency changes and the published package is unaffected. Only `package.json` and the lockfile changed in these bumps, and no file headers were restamped.

- `@cldmv/fix-headers` `^2.1.2` → `^2.2.0` ([#61](#61) took it to `^2.1.4`, [#63](#63) to `^2.2.0`). Version 2.1.4 no longer writes a JavaScript comment into JSON or Markdown files, processes every repeated `--input`, and never walks dependency folders such as `node_modules`. Version 2.2.0 makes the `@Last modified by` header tag follow content edits only, so a header-only rewrite keeps the recorded editor instead of replacing it. It requires Node.js `>=22.12.0`, which matches the package's `engines.node`.
- `@cldmv/configs` `^1.2.1` → `^1.2.4` ([#63](#63)). It provides the shared `fix-headers` configuration that `.configs/fix-headers.json` extends. Version 1.2.4 turns off `forceAuthorUpdate` and `forceLastModifiedAuthorUpdate` (both were on in 1.2.1), so the shared configuration no longer overwrites the recorded author or last editor.

---

## Upgrade notes

- If anything imports `@cldmv/droidsock/devcheck`, remove that import. Nothing else needs to change.
- `import droidsock from "@cldmv/droidsock"` and `require("@cldmv/droidsock")` both work as before on Node.js 22.12.0 or later.



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

- @Shinrai

</details>

---

<!-- coverage-start -->

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

| Metric | Coverage |
|--------|----------|
| Statements | 93.0% |
| Branches   | 85.3% |
| Functions  | 94.4% |
| Lines      | 94.5% |

*Avg: **91.8%** · `d7d1cb5` · Node lts/**

<!-- coverage-end -->

<!-- co-authors -->

Co-authored-by: Shinrai <Shinrai@users.noreply.github.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant