Skip to content

deps: refresh lockfile to the latest in-range versions - #163

Merged
Shinrai merged 1 commit into
nextfrom
deps/patch-bumps-2026-10-31
Oct 31, 2026
Merged

Shinrai merged 1 commit into
nextfrom
deps/patch-bumps-2026-10-31

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Oct 31, 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: refresh lockfile to the latest in-range versions (2967dd0)

🔧 Other Changes

No other changes

👥 Contributors

Supersedes the open Dependabot bumps #159 (patch group, next) and the
hotfixes redirects #147, #149, #151 and #154. Every version those PRs
targeted is met or exceeded: vitest/@vitest/coverage-v8 5.0.5,
@cldmv/vitest-runner 1.5.6, @cldmv/configs 1.3.0, @cldmv/jsonv 1.1.5,
@cldmv/eslint-plugin-jsonv 1.0.17, @cldmv/prettier-plugin-jsonv 1.1.4,
eslint 10.14.0, @eslint/css 2.0.1, @eslint/json 2.1.1, vite 8.3.5,
rolldown 1.2.16, postcss 8.5.32, nanoid 3.3.20, source-map-js 1.2.2.
Lockfile only; no package.json range changes.
@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 31, 2026
@Shinrai
Shinrai merged commit ba9f683 into next Oct 31, 2026
31 checks passed
@cldmv-bot
cldmv-bot Bot deleted the deps/patch-bumps-2026-10-31 branch October 31, 2026 21:15
cldmv-bot Bot added a commit that referenced this pull request Oct 31, 2026
# `@cldmv/fix-headers` v2.2.3 Changelog

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

---

## Overview

Version 2.2.3 fixes data loss in a header rewrite. Until now, rewriting an existing header replaced the whole matched comment, so any text in it that was not a header field (a description under `@Copyright`, a co-author or licence line, a line wrapping a field's value) was deleted. A repository-wide run over 756 files removed about 68 such lines from 8 files ([#160](#160)). That text is now always kept, verbatim and in its original order.

By default the kept text moves out of the header into its own comment block directly below it, so the header block holds only header fields. Because there are two reasonable places for that text, the fix comes with a `strictHeaderBlock` setting to choose between them: turning it off (CLI `--no-strict-header-block`, or `--strict-header-block false`) keeps the text inside the header after the fields instead. Either way it is never deleted.

This changes what a run writes to files whose header carries extra text: the first run after upgrading moves that text below the header. Files whose header holds only fields are written exactly as before. The rest of the release is a dependency refresh, including `ignore` 7.0.14 within its existing range.

---

## 🐛 Bug Fixes

### Text inside an existing header is kept, never deleted ([#161](#161), fixes [#160](#160))

Any line in an existing header that is not one of the fields fix-headers writes (`@Project`, `@Filename`, `@Date`, `@Author`, `@Email`, `@Last modified by`, `@Last modified time`, `@Copyright`), a `-----` separator or an empty comment line is now header text, and header text is never dropped. In detail:

- **Text moves to its own block.** With `strictHeaderBlock` (the default), header text is written, comment prefix included, to a comment block directly below the regenerated header, in the file's comment style (`/** … */`, `<!-- … -->` or `#` lines) and with the file's own line ending. The configured `margin` separates the header, the moved block and the rest of the file.
- **Or stays in the header.** With `strictHeaderBlock` off (`"strictHeaderBlock": false` in the config file, `--no-strict-header-block` or `--strict-header-block false` on the CLI) the text stays inside the header after an empty comment line below the fields. The setting is in the `fixHeaders` options type and the `--help` text.
- **Only the first tag is a field.** A repeated `@Author` or `@Copyright` line (a third-party notice, for example) is kept as text instead of being merged into the field. A dash line among text, rather than next to a field, is text too.
- **Wrapped values are kept.** A line that continues a field's value used to be removed when the field was rewritten. Because fix-headers did not write it, it is now kept as text.
- **Directives stay above a `#` header.** Directive lines at the top of a `#` comment stay where they are: a PEP 263 encoding declaration (`# -*- coding: utf-8 -*-`) on the file's first or second line, `#cloud-config`, a `yaml-language-server` comment, and `vim:`/`vi:`/`ex:` modelines at the start of the comment text. Any other comment line there, including prose such as "Decoding: base64", is header text.
- **A second run leaves the moved block alone.** A comment after the header is only absorbed as a stacked copy of the header when its first non-empty line is `@Project:`. A moved block whose first line is itself a `@Project:` line is written with the lead line `Moved out of the file header by fix-headers:` above it, so a later run does not read it back as fields.
- **The edit is not a content change.** Moving text out of the header keeps the recorded `@Last modified by`.
- **`--diff` and `--sample-output` show the move.** The new value covers the header and the block moved below it, so moved text appears as moved rather than deleted.
- **HTML header delimiters.** The closing delimiter of an HTML-comment header is stripped whether it is written `-->` or `--!>`.

Follow-up edge cases found while reviewing this fix are tracked in [#162](#162). They cover `#` headers in files with CRLF line endings or a byte-order mark, a stacked header that starts with text, and `vi:` prose at the very top of a comment.

## 📚 Documentation

- **NEW:** [docs/changelog/v2/v2.2.3.md](./v2.2.3.md): this changelog.
- README: new "Text in the header block" section with a before/after example, and the `strictHeaderBlock` option and CLI flags in the option lists ([#161](#161)).
- README What's New promoted to v2.2.3.

## 🔧 Dependencies

Every entry is a lockfile-only update within the existing `package.json` range; no range changed.

### Runtime

- **`ignore` 7.0.12 → 7.0.14** ([#163](#163)). It is the only dependency fix-headers declares (`^7.0.5`) and is kept external by the build, so a consumer's install already resolves it from that range.

### Development

- **`prettier` 3.9.9 → 3.9.10** ([#144](#144)).
- **`vitest` and `@vitest/coverage-v8` 5.0.3 → 5.0.5**, with `vite` 8.3.2 → 8.3.5, `rolldown` 1.2.12 → 1.2.16 and its platform bindings ([#163](#163)).
- **`@cldmv/vitest-runner` 1.5.3 → 1.5.6** ([#163](#163)).
- **`@cldmv/configs` 1.2.4 → 1.3.0**, the shared config behind this repository's own `fix:headers` run. That run leaves every file unchanged with the new version ([#163](#163)).
- **`eslint` 10.12.0 → 10.14.0**, `@eslint/css` 2.0.1, `@eslint/json` 2.1.1 ([#163](#163)).
- **`@cldmv/jsonv` 1.1.5, `@cldmv/eslint-plugin-jsonv` 1.0.17, `@cldmv/prettier-plugin-jsonv` 1.1.4** ([#163](#163)).
- **`@types/node` 26.6.4 → 26.6.6** ([#163](#163)).
- Development-only transitives, including `postcss` 8.5.32, `nanoid` 3.3.20 and `source-map-js` 1.2.2. These also cover the Dependabot security bumps that had been opened against `hotfixes` ([#163](#163)).

---

## Upgrade notes

- No breaking change to the `fixHeaders` API or the CLI. `strictHeaderBlock` defaults to on, so existing configs need no change.
- **Expect a one-time diff in files whose header carries extra text.** The first run after upgrading moves that text into its own block below the header. Run with `--dry-run --diff` first to review it, or set `"strictHeaderBlock": false` to keep the text inside the header.
- Text that an earlier version already deleted is not recovered; restore it from version control if needed.



<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.9% |
| Branches   | 98.2% |
| Functions  | 100.0% |
| Lines      | 99.9% |

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

! 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