Repository navigation
release: v2.2.3 - text inside an existing header that isn't a header… - #145
Merged
Merged
Conversation
Bumps the prettier group with 1 update: [prettier](https://github.com/prettier/prettier). Updates `prettier` from 3.9.9 to 3.9.10 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.9.9...3.9.10) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.9.10 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: prettier ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps the prettier group with 1 update: [prettier](https://github.com/prettier/prettier). Updates `prettier` from 3.9.9 to 3.9.10 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p> <blockquote> <h2>3.9.10</h2> <ul> <li>Markdown: Update <code>micromark-extension-gfm-table</code> to fix the table parse issue on performance (<a href="https://redirect.github.com/prettier/prettier/pull/20266">#20266</a> by <a href="https://github.com/fisker"><code>@fisker</code></a>)</li> </ul> <p>🔗 <a href="https://github.com/prettier/prettier/blob/3.9.10/CHANGELOG.md#3910">Changelog</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's changelog</a>.</em></p> <blockquote> <h1>3.9.10</h1> <p><a href="https://github.com/prettier/prettier/compare/3.9.9...3.9.10">diff</a></p> <h4>Markdown: Update <code>micromark-extension-gfm-table</code> to fix the table parse issue on performance (<a href="https://redirect.github.com/prettier/prettier/pull/20266">#20266</a> by <a href="https://github.com/fisker"><code>@fisker</code></a>)</h4> <p>See <a href="https://github.com/micromark/micromark-extension-gfm-table/commit/4f43ead37b786bc531d924530d4ab4c714886267">https://github.com/micromark/micromark-extension-gfm-table/commit/4f43ead37b786bc531d924530d4ab4c714886267</a> for details.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/prettier/prettier/commit/1172b82c295c4f889fd787dc6c78c3e194ebf353"><code>1172b82</code></a> Release 3.9.10</li> <li><a href="https://github.com/prettier/prettier/commit/d0142273aff2c76f8a69785d42ee2cedc4b0aaa3"><code>d014227</code></a> Update <code>micromark-extension-gfm-table</code> to fix the table parse issue on perfor...</li> <li><a href="https://github.com/prettier/prettier/commit/953b9084329dcd06ed1072a04b333f1e6e9371e8"><code>953b908</code></a> Bump Prettier dependency to 3.9.9</li> <li><a href="https://github.com/prettier/prettier/commit/ad8a6bf4fa23c42fd114683fec43b28a11bd24af"><code>ad8a6bf</code></a> Clean changelog_unreleased</li> <li>See full diff in <a href="https://github.com/prettier/prettier/compare/3.9.9...3.9.10">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details>
Contributor
Author
🔒 Dependency Review
|
Contributor
Author
|
| File | Raw | Δ Raw | Gzipped | Δ Gzipped |
|---|---|---|---|---|
| bin/fix-headers.mjs | 55.6 kB | +3.8 kB (+7.2%) |
19.0 kB | +1.4 kB |
| dist/index.cjs | 1.6 kB | — | 940 B | — |
| dist/index.mjs | 46.0 kB | +3.4 kB (+7.9%) |
16.0 kB | +1.3 kB |
| Total | 103.2 kB | +7.1 kB | 35.9 kB | +2.7 kB |
📊 Generated by bundle-size. Brotli sizes also measured but omitted from the table for brevity.
…d moves to its own block below the header, never deleted (#160) A header rewrite replaced the whole matched comment, so description lines and any other non-field text in it were dropped. Those lines are now kept verbatim and in order: with the new strictHeaderBlock option (default true) they go to their own comment block directly below the header, in the file's comment style (block, HTML or # lines); with strictHeaderBlock: false (CLI --no-strict-header-block) they stay inside the header after the fields. Moving them is not a content edit, so @last modified by is kept.
… it ends --> or --!> (#160)
…s above a # header; diff covers the moved block (#160) Review follow-up for the header-block text move: - A managed tag is a field only the first time it appears in a header comment; a repeated @author or @copyright (a third-party notice) and a dash line among text are kept as text. - A line directly after a field, indented further or without the comment prefix, is that field's wrapped value and is rewritten with it. - In a # header, comment lines directly above the first field (coding line, #cloud-config, modelines) stay above the header. - --diff / --sample-output compare against everything that replaced the old header, so moved text shows as moved, not deleted. - --strict-header-block [true|false] joins --no-strict-header-block. - The moved block uses the file's own line ending.
…ly directive lines stay above a # header (#160) The continuation class deleted text fix-headers did not write (a star-less description, a co-author line, a licence line under @copyright). Every non-field line is now text: moved below the header in strict mode, kept inside it after the fields otherwise. Only directive-shaped lines at the top of a # header (coding declaration, #cloud-config, yaml-language-server and vim/vi/ex modelines) keep their place above it; any other comment line there is header text.
…o it on a later run (#160) A comment after the header is only absorbed as a stacked header when its first non-empty line is @project:, and a moved block that would start with a @project: line is written with a lead line, so a second strict run no longer reads the moved lines as fields and drops them. Encoding declarations stay above a # header only on the file's first two lines and only as a PEP 263 coding word; vim/vi/ex modelines only at the start of the comment text, so prose such as 'Decoding: base64' or 'like vi: modal' is header text.
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.
Shinrai
approved these changes
Oct 31, 2026
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.
@cldmv/fix-headersv2.2.3 ChangelogRelease Date: October 2026
Release Type: Patch
Branch:
release/2.2.3Overview
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). 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
strictHeaderBlocksetting 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
ignore7.0.14 within its existing range.🐛 Bug Fixes
Text inside an existing header is kept, never deleted (#161, fixes #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: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 configuredmarginseparates the header, the moved block and the rest of the file.strictHeaderBlockoff ("strictHeaderBlock": falsein the config file,--no-strict-header-blockor--strict-header-block falseon the CLI) the text stays inside the header after an empty comment line below the fields. The setting is in thefixHeadersoptions type and the--helptext.@Authoror@Copyrightline (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.#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, ayaml-language-servercomment, andvim:/vi:/ex:modelines at the start of the comment text. Any other comment line there, including prose such as "Decoding: base64", is header text.@Project:. A moved block whose first line is itself a@Project:line is written with the lead lineMoved out of the file header by fix-headers:above it, so a later run does not read it back as fields.@Last modified by.--diffand--sample-outputshow the move. The new value covers the header and the block moved below it, so moved text appears as moved rather than deleted.-->or--!>.Follow-up edge cases found while reviewing this fix are tracked in #162. They cover
#headers in files with CRLF line endings or a byte-order mark, a stacked header that starts with text, andvi:prose at the very top of a comment.📚 Documentation
strictHeaderBlockoption and CLI flags in the option lists (#161).🔧 Dependencies
Every entry is a lockfile-only update within the existing
package.jsonrange; no range changed.Runtime
ignore7.0.12 → 7.0.14 (#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
prettier3.9.9 → 3.9.10 (#144).vitestand@vitest/coverage-v85.0.3 → 5.0.5, withvite8.3.2 → 8.3.5,rolldown1.2.12 → 1.2.16 and its platform bindings (#163).@cldmv/vitest-runner1.5.3 → 1.5.6 (#163).@cldmv/configs1.2.4 → 1.3.0, the shared config behind this repository's ownfix:headersrun. That run leaves every file unchanged with the new version (#163).eslint10.12.0 → 10.14.0,@eslint/css2.0.1,@eslint/json2.1.1 (#163).@cldmv/jsonv1.1.5,@cldmv/eslint-plugin-jsonv1.0.17,@cldmv/prettier-plugin-jsonv1.1.4 (#163).@types/node26.6.4 → 26.6.6 (#163).postcss8.5.32,nanoid3.3.20 andsource-map-js1.2.2. These also cover the Dependabot security bumps that had been opened againsthotfixes(#163).Upgrade notes
fixHeadersAPI or the CLI.strictHeaderBlockdefaults to on, so existing configs need no change.--dry-run --difffirst to review it, or set"strictHeaderBlock": falseto keep the text inside the header.👥 Contributors
Avg: 99.5% ·
8ffd077· Node lts/*Co-authored-by: Shinrai [email protected]