Skip to content

deps: bump @cldmv/fix-headers from 1.3.12 to 2.1.0 - #564

Merged
Shinrai merged 1 commit into
nextfrom
dependabot/npm_and_yarn/next/cldmv/fix-headers-2.1.0
Oct 3, 2026
Merged

Shinrai merged 1 commit into
nextfrom
dependabot/npm_and_yarn/next/cldmv/fix-headers-2.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Bumps @cldmv/fix-headers from 1.3.12 to 2.1.0.

Release notes

Sourced from @​cldmv/fix-headers's releases.

v2.1.0

release: v2.1.0 - add spacing and margin options; frame headers with…

@​cldmv/fix-headers v2.1.0 Changelog

Release Date: September 2026 Release Type: Minor Branch: release/2.1.0


Overview

Version 2.1.0 adds two layout options, spacing and margin, and by default frames every header with empty comment lines and leaves two blank lines before the file's own content. It fixes line-comment headers (YAML, Python and other # languages) losing the bare comment lines that pad the top and bottom of the header, which happened because the parser replaces the whole leading comment run and the line renderer had no top and bottom lines to put back. It also carries a patch-level bump of four dependencies.

No option was removed and the fixHeaders API is unchanged. Existing headers are restyled to the new layout on the first run; pass spacing: 0 and margin: 1 to keep the previous compact layout.


✨ Features

spacing and margin header layout options (#101)

Both options are top-level settings in a config file, in the fixHeaders API and on the CLI (--spacing <n>, --margin <n>), and apply to every file type:

  • spacing (default 1) is the number of empty comment lines just inside the header's opening and just before its closing. A block header gets an empty * line under /** and above */; a line-comment header gets a bare # (or the language's own prefix) above and below the fields.
  • margin (default 2) is the number of blank lines between the header and the file's next content. A line-comment header always keeps at least one blank line after it, even with margin: 0, so a comment that follows the header is not read as part of it.

Both accept any whole number of 0 or more; anything else is rejected before a file is touched. An existing header of any layout is restyled in place, and a second run with unchanged options finds nothing to update. See Header layout in the README.

Closes #100.

🐛 Bug Fixes

Line-comment headers keep their padded frame lines (#101)

A YAML workflow or Python file that carried the common template header, with a bare # line above and below the field block, lost both lines on the first run, and the header then ran straight into the next comment. renderHeaderLines now emits the frame lines for line headers as well, controlled by spacing. Block headers get the same frame (/**, *, fields, *, */), where before /** was followed directly by the first field.

📚 Documentation

🔧 Dependencies

  • ignore 7.0.9 → 7.0.10, @types/node 26.6.2 → 26.6.3, @vitest/coverage-v8 5.0.1 → 5.0.2 and vitest 5.0.1 → 5.0.2 (#98). Only ignore is a runtime dependency.

Upgrade notes

... (truncated)

Commits
  • 22815e6 release: v2.1.3 - bump the patch group across 1 directory with 2 updates
  • fc0ee86 release: v2.1.2 - adopt the shared CLDMV fix-headers config and stamp…
  • 0eb3517 release: v2.1.1 - end a header-only file with the header instead of…
  • 080ab89 release: v2.1.0 - add spacing and margin options; frame headers with…
  • 68847df release: v2.0.0 - re-cut the release notes as v2.0.0
  • See full diff in compare view
Install script changes

This version adds prepare script that runs during installation. Review the package contents before updating.


@cldmv-bot cldmv-bot Bot added the type: dependencies Relates to dependency updates, version bumps, or package management label Oct 3, 2026
@Shinrai

Shinrai commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

@dependabot rebase

Bumps [@cldmv/fix-headers](https://github.com/CLDMV/fix-headers) from 1.3.12 to 2.1.0.
- [Release notes](https://github.com/CLDMV/fix-headers/releases)
- [Commits](CLDMV/fix-headers@v1.3.12...v2.1)

---
updated-dependencies:
- dependency-name: "@cldmv/fix-headers"
  dependency-version: 2.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/next/cldmv/fix-headers-2.1.0 branch from 156b95f to 9469150 Compare October 3, 2026 19:49
@Shinrai
Shinrai merged commit b87d72a into next Oct 3, 2026
27 checks passed
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/next/cldmv/fix-headers-2.1.0 branch October 3, 2026 20:25
cldmv-bot Bot added a commit that referenced this pull request Oct 5, 2026
# Slothlet v3.22.1 Changelog

**Release Date**: October 2026
**Release Type**: Patch
**Branch**: `next` → `master`

---

## Overview

Version 3.22.1 fixes how the package loads from CommonJS. `require("@cldmv/slothlet")` used to return a wrapper function that was not the function ESM consumers import, and its `defaults` property was attached a tick later, so reading `slothlet.defaults` in the same tick as the `require()` gave `undefined`. The CommonJS entry now loads the ES module build through Node's synchronous `require(esm)` and returns that build's own default export, so CommonJS and ESM consumers get the identical function with `defaults` and the named `slothlet` alias already set. A follow-up makes that identity independent of load order.

The rest of the release is tooling. Every file header in the repository was restamped by `@cldmv/fix-headers` 2.1 and the shared `@cldmv/configs` config, which touched more than a thousand files but changed comments only, and the dev dependencies moved forward (`@cldmv/fix-headers` 1.3.12 to 2.2.0, `@cldmv/configs` 1.2.4 added, the Vitest 5.0.3 patch group, and two patched transitive packages). No runtime dependency changed, and the public API, the hooks, the permissions system and the instance lifecycle are untouched.

---

## ⚠️ Behavior changes

### `@cldmv/slothlet/devcheck` is no longer published ([#568](#568))

`devcheck.mjs` is a guard that only acts inside a source checkout of this repository: it does nothing in an installed copy. It is removed from the `files` whitelist and from the `exports` map, so `import "@cldmv/slothlet/devcheck"` no longer resolves. `index.mjs` now imports it by relative path inside its existing `try`/`catch`, which is skipped in a browser and silently ignored when the file is absent, as it is in a published package. Nothing a consumer could rely on changed, but the subpath is gone.

### CommonJS needs `require(esm)` ([#568](#568))

`index.cjs` now requires `index.mjs` directly. On a Node.js version without `require(esm)` (before 20.19 on the 20.x line, or before 22.12) it throws an error with code `ERR_REQUIRE_ESM` and a message that names the running version and points at `import()`. The package already declares `engines.node` `>=22.15.0` since [v3.22.0](./v3.22.0.md), so a supported Node.js version always has `require(esm)`.

## 🐛 Bug Fixes

### `require()` returns the ESM entry's own function, synchronously ([#568](#568))

`index.cjs` wrapped `index.mjs` in its own `async function slothlet(options)` that ran a dynamic `import()` on every call, and attached `slothlet.defaults` from a separate `import()` that settled on the microtask queue. As a result `require("@cldmv/slothlet")` was a different function than the ESM default export, and `defaults` was undefined in the tick that called `require()`.

The entry is now a thin wrapper: it checks `process.features.require_module`, requires `./index.mjs`, and exports that module's default. `slothlet.defaults` is set when `require()` returns, and `const { slothlet } = require("@cldmv/slothlet")` reads the named alias off the same function.

`index.mjs` itself had to become loadable through `require(esm)`, which rejects any module graph that contains top-level `await`:

- **New `helpers/reserved-keys` module.** `slothlet.defaults` is built by `helpers/defaults`, which imported `ComponentBase` and `IMPL_METADATA_KEYS` from the wrapper classes, and those reach `helpers/platform` and its top-level `await`. The two reserved-key Sets (`WRAPPER_INTERNAL_KEYS`, served as `ComponentBase.INTERNAL_KEYS`, and `IMPL_METADATA_KEYS`) now live in `src/lib/helpers/reserved-keys.mjs`, a module with no imports. The classes serve the same Set objects from there, so `slothlet.defaults.reservedExports` and every filter built on the Sets behave as before. The module is marked internal.
- **No top-level `await` for the dev check.** The `devcheck` import runs inside an async function rather than at the top level of `index.mjs`.

### CommonJS and ESM consumers see an identical function ([#570](#570))

The first version of the fix still wrote `module.exports.slothlet = slothlet` onto the function ESM consumers import, so that function's own keys were `["defaults"]` for an ESM-only load and `["defaults", "slothlet"]` once anything had called `require()`. `index.mjs` now sets `slothlet.slothlet = slothlet` itself and `index.cjs` no longer writes to the shared function, so both module systems see exactly `defaults` and `slothlet` whichever loads first. The generated type declarations include the `slothlet` property.

## 🧪 Tests

- `tests/node/entrypoint-cjs.cjs` (run by `npm test` through `test:node`) now checks that `require()` returns the same function as the ESM default export, that `.defaults` is already set in the tick of the `require()`, that `.defaults.routines` is an array, that the named alias matches the ESM named export, and that CJS and ESM loads expose the same own keys in a fresh process. A child process started with `--no-experimental-require-module` checks that the entry fails with `ERR_REQUIRE_ESM`, the version requirement and the `import()` hint.
- The Vitest setup files no longer carry a commented-out `@cldmv/slothlet/devcheck` import.

## 🔧 CI & tooling

### File headers restamped, and the shared fix-headers config adopted ([#569](#569))

- **Framed header layout.** `@cldmv/fix-headers` 2.1 writes each header with an empty ` *` line inside the opener and before the closer. Running `npm run fix:headers` rewrote the header of about 1,150 source, test, tool and fixture files in that layout, refreshed `@Last modified time`, and corrected 89 `@Date` epochs that did not match their date text. Header comments are the only change in those files, and the `types/*.d.mts.map` files were regenerated for the shifted lines. No JSON or Markdown file was touched.
- **ISO dates.** The shared config turns on `normalizeDateFormat`, so every header date is written as `2026-10-03T20:02:20-07:00`. Before, `@Last modified time` used a space form (`2026-10-03 20:02:20 -07:00`) next to an ISO `@Date`, and 580 `@Date` values were still in the space form. Each date keeps its instant.
- **Shared config.** `tools/dev/fix-headers.mjs` no longer hard-codes house settings. It passes the new `.configs/fix-headers.json`, which extends `@cldmv/configs/fix-headers.json` and sets only the project name, and keeps the repository's own include lists. The shared settings restamped another 288 headers: `@Author` and `@Last modified by` use the signing-key name, four last-modified emails moved to the noreply address, and 16 `@Date` values moved back to the file's first commit. The wrapper passes `margin: 1`, because the default margin of 2 is collapsed to 1 by Prettier and the precommit `fix:headers` and `format` steps would otherwise rewrite every file back and forth.
- **`--diff` prints the diff.** `npm run fix:headers -- --diff` (and `--dry-run`, which implies it) now prints each changed file's header diff instead of only listing file names.
- **Header checks accept the framed layout.** The header and stacked-header checks in `tools/dev/analyze-errors.mjs` allow empty comment lines just inside the opener and before the closer, so the new layout is not reported as a missing header.
- **Later bumps changed nothing.** fix-headers 2.2.0 ([#572](#572)) and `@cldmv/configs` 1.2.4 ([#572](#572)) ran `fix:headers` and restamped 0 files. From 2.2.0 the `@Last modified by` tag follows content edits only, and 1.2.4 sets `forceAuthorUpdate` and `forceLastModifiedAuthorUpdate` to `false`, so `@Author` is never rewritten.

The comment-only edits to the build tools (`tools/build/build-subpackages.mjs`, `tools/build/build-typestubs.mjs`) just drop their mentions of `./devcheck`.

## 📚 Documentation

- **NEW:** [docs/changelog/v3/v3.22.1.md](./v3.22.1.md): this changelog.
- README What's New promoted to v3.22.1.

## 🔧 Dependencies

All dev-only. `dependencies`, `optionalDependencies` and `peerDependencies` are unchanged, and the only entries that moved in the lockfile are the ones below.

- **`@cldmv/fix-headers` `^1.3.10` → `^2.2.0`** (locked 1.3.12 to 2.2.0), in four steps: 2.1.0 ([#564](#564), Dependabot), 2.1.4 ([#569](#569), with the restamp above) and 2.2.0 ([#572](#572), no headers changed).
- **`@cldmv/configs` `^1.2.4`**, newly added as a dev dependency ([#569](#569) added it at `^1.2.2`, [#572](#572) raised it to 1.2.4). Provides the shared fix-headers config that `.configs/fix-headers.json` extends.
- **Vitest 5.0.2 → 5.0.3 patch group** ([#566](#566)): `vitest`, `@vitest/browser`, `@vitest/browser-playwright` and `@vitest/coverage-v8` 5.0.2 to 5.0.3, `@vitest/istanbul-lib-coverage` 1.0.1 to 1.0.2, `chalk` 6.0.0 to 6.0.1 and `ignore` 7.0.10 to 7.0.11. The `package.json` ranges already allowed these, so only the lockfile changed. The resolution also moves the transitive `why-is-node-running` from 3.2.2 to 3.2.1, the version `vitest` asks for.
- **Indirect dev dependencies from Dependabot's `npm_and_yarn` group**: `markdown-it` 14.2.0 to 14.3.2 ([#561](#561)) and `brace-expansion` 5.0.9 to 5.0.12 together with `markdown-it` ([#565](#565)). Lockfile only.

---

## Upgrade notes

- **Drop-in for [v3.22.0](./v3.22.0.md)** on every supported Node.js version (`>=22.15.0`). No API, option or behavior of an api instance changed.
- **CommonJS:** `require("@cldmv/slothlet")` now returns the same function as `import slothlet from "@cldmv/slothlet"`, and `.defaults` and the named `slothlet` alias are available immediately. Code that compared or monkey-patched the old wrapper function is the only thing that can notice.
- **ESM:** the default export gains an own `slothlet` property pointing at itself (the named alias), which now exists whichever way the package is loaded.
- **Anything importing `@cldmv/slothlet/devcheck`** must drop that import. It was a source-checkout guard and has no effect in an installed copy.



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

- @Shinrai

</details>

---

<!-- coverage-start -->

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

| Metric | Coverage |
|--------|----------|
| Statements | 99.6% |
| Branches   | 99.1% |
| Functions  | 99.7% |
| Lines      | 99.8% |

*Avg: **99.5%** · `edc99eb` · 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

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