@cldmv/fix-headers 2.1.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,50 +1,82 @@
1
1
  # @cldmv/fix-headers
2
2
 
3
- Multi-language source header normalizer for Node.js projects.
3
+ **@cldmv/fix-headers** is a multi-language source header normalizer for Node.js projects. It scans a project's files, works out which project each file belongs to from the manifests around it (`package.json`, `pyproject.toml`, `composer.json`, `Cargo.toml`, `go.mod`, …), detects the author from git, and inserts or updates a standard header at the top of every file in that file's own comment syntax.
4
4
 
5
- `@cldmv/fix-headers` scans project files, auto-detects project metadata (language, root, project name, git author/email), and inserts or updates standard file headers.
5
+ Headers stay correct without hand-editing: `@Date` follows the file's real creation time, `@Author` keeps the original author, `@Last modified by` names whoever last edited the file's content and `@Last modified time` only moves when the header changes, the `@Copyright` holder and years come from the manifest and the file's history, and `--check` validates existing headers in CI without writing anything. It runs as a `fix-headers` command line tool or as a library from ESM and CommonJS, and one shared config can serve every repository in an organisation.
6
+
7
+ > _One header format for every file in every repository, detected from the project itself and kept current by a single command._
6
8
 
7
9
  [![npm version]][npm_version_url] [![npm downloads]][npm_downloads_url] <!-- [![GitHub release]][github_release_url] -->[![GitHub downloads]][github_downloads_url] [![Last commit]][last_commit_url] <!-- [![Release date]][release_date_url] -->[![npm last update]][npm_last_update_url] [![Coverage]][coverage_url]
8
10
 
9
11
  [![Contributors]][contributors_url] [![Sponsor shinrai]][sponsor_url]
10
12
 
13
+ ---
14
+
11
15
  ## ✨ What's New
12
16
 
13
- ### Latest: v2.1.3 (October 2026)
17
+ ### Latest: v2.2.0 (October 2026)
14
18
 
15
- - **CI and development-dependency maintenance, no runtime change** — the `✅ Required PR Check` mirror job in `ci.yml` no longer carries the required name while it is skipped, so a skipped `pull_request` run can no longer satisfy the branch ruleset and let an in-repo PR merge before the push run's tests have finished ([#111](https://github.com/CLDMV/fix-headers/pull/111)). Four development dependencies move to their current releases in the lockfile: `@cldmv/jsonv` 1.1.1, `@cldmv/eslint-plugin-jsonv` 1.0.13, `@cldmv/prettier-plugin-jsonv` 1.1.0 and `@cldmv/vitest-runner` 1.5.1 ([#109](https://github.com/CLDMV/fix-headers/pull/109), [#114](https://github.com/CLDMV/fix-headers/pull/114)). `ignore`, the only runtime dependency, is unchanged, and `dist/`, `bin/` and the API are the same as in v2.1.2.
16
- - [View full v2.1.3 Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.1.3.md)
19
+ - **`@Last modified by` names whoever last edited the file's content** — a run that only rewrites a header (a date format conversion, a corrected `@Project`, new spacing or margin) now keeps the recorded editor instead of writing the run's identity, so running fix-headers never claims other people's files. The edit check compares the file, header removed, with its body at git `HEAD`: a changed or not-yet-committed body makes the run's identity the last editor, and `@Author` stays the original author unless `forceAuthorUpdate` is set. `@Last modified time` still moves whenever a header is rewritten, and `forceLastModifiedAuthorUpdate` is no longer needed for normal use ([#128](https://github.com/CLDMV/fix-headers/pull/128)).
20
+ - [View full v2.2.0 Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.0.md)
17
21
 
18
22
  ### Recent Releases
19
23
 
20
- - **v2.1.2** (October 2026) — no runtime change: the repository adopts the shared CLDMV fix-headers config (`.configs/fix-headers.json` extending `@cldmv/configs/fix-headers.json`, run with `npm run fix:headers`) and stamps uniform file headers across its own sources ([#107](https://github.com/CLDMV/fix-headers/pull/107)) ([Release](https://github.com/CLDMV/fix-headers/releases/tag/v2.1.2))
21
- - **v2.1.1** (October 2026) — a file that holds only a header now ends with the header instead of trailing `margin` blank lines ([#105](https://github.com/CLDMV/fix-headers/pull/105), fixes [#104](https://github.com/CLDMV/fix-headers/issues/104)); `esbuild` bumped to 0.28.2 to clear GHSA-g7r4-m6w7-qqqr ([#103](https://github.com/CLDMV/fix-headers/pull/103)) ([Release](https://github.com/CLDMV/fix-headers/releases/tag/v2.1.1))
22
- - **v2.1.0** (September 2026) — `spacing` and `margin` header layout options: every header is framed with empty comment lines and followed by two blank lines, and YAML and Python headers keep their padded `#` lines on the first run ([#101](https://github.com/CLDMV/fix-headers/pull/101)) ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.1.0.md))
23
- - **v2.0.0** (September 2026) — built package (`dist/` and `bin/` instead of `src/`), discovery without name-based skips, `@Project` and the copyright holder from the project manifest, `--check` date validation, `--diff`, `--timezone` and config `extends` ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.0.0.md))
24
+ - **v2.1.4** (October 2026) — strict JSON, Markdown named with `--input` and files with no or an unhandled extension are skipped and reported instead of getting a JavaScript comment; `--input` is repeatable; dependency folders are never walked; `require()` fails clearly where Node.js cannot load ES modules ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.1.4.md))
25
+ - **v2.1.3** (October 2026) — CI and development-dependency maintenance with no runtime change: a skipped PR run can no longer satisfy `✅ Required PR Check` and let a pull request merge before its tests finish ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.1.3.md))
26
+ - **v2.1.2** (October 2026) — no runtime change: the repository adopts the shared CLDMV fix-headers config from `@cldmv/configs` and stamps uniform file headers across its own sources ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.1.2.md))
27
+ - **v2.1.1** (October 2026) — a file that holds only a header now ends with the header instead of trailing `margin` blank lines; `esbuild` 0.28.2 clears GHSA-g7r4-m6w7-qqqr ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.1.1.md))
28
+
29
+ 📚 For complete release notes, see the [docs/changelog/](https://github.com/CLDMV/fix-headers/tree/master/docs/changelog/) folder.
24
30
 
25
- 📚 For complete release notes, see the [docs/changelog/](https://github.com/CLDMV/fix-headers/tree/master/docs/changelog/) folder and the [GitHub Releases](https://github.com/CLDMV/fix-headers/releases).
31
+ ---
26
32
 
27
- ## Features
33
+ ## 🚀 Key Features
28
34
 
29
35
  - Finds the project each file belongs to from its manifest (`package.json`, `pyproject.toml` / `setup.cfg` / `setup.py`, `composer.json`, `Cargo.toml`, `go.mod`), whatever the file's type
30
- - `@Project` is the name from that project's manifest, so a CSS, HTML, YAML or JSON file in a Python, PHP, Rust or Go project gets that project's name too; the folder name is used only when no manifest provides one. Override it with `projectName`. See [Project name and root](#project-name-and-root)
36
+ - `@Project` is the name from that project's manifest, so a CSS, HTML, YAML or JSONC file in a Python, PHP, Rust or Go project gets that project's name too; the folder name is used only when no manifest provides one. Override it with `projectName`. See [Project name and root](#-project-name-and-root)
31
37
  - Auto-detects author and email from git config/commit history
38
+ - Keeps the original `@Author`, and changes `@Last modified by` only when the file's content (everything outside the header) was edited, so a run that only rewrites headers never claims other people's files. See [Author and last modified](#-author-and-last-modified)
32
39
  - Supports per-run overrides for every detected value
33
40
  - Supports folder inclusion and exclusion configuration; skips only what the project's ignore files (everything git honours) or your own exclusions say
34
41
  - Supports monorepos: every file resolves its own project from the nearest manifest in its parent tree
42
+ - Writes each header in the file's own comment syntax, and skips files that cannot carry one (strict JSON, plain text); Markdown gets a header only when you force it. See [Supported file types](#-supported-file-types)
35
43
  - Supports per-detector syntax overrides for line and block comment tokens
36
- - Config files can use `extends` to build on a shared config (an https URL, an npm package path or a file path), so one organisation-wide config serves every repository. See [Shared configs](#shared-configs)
44
+ - Config files can use `extends` to build on a shared config (an https URL, an npm package path or a file path), so one organisation-wide config serves every repository. See [Shared configs](#-shared-configs)
37
45
  - Supports both ESM and CJS consumers
38
46
 
39
- ## Install
47
+ ---
48
+
49
+ ## 📦 Installation
50
+
51
+ ### Requirements
52
+
53
+ - **Node.js 22.12.0 or later** (`engines.node` is `>=22.12.0`).
54
+ - The package is an ES module and loads with `import` on every supported version. `require("@cldmv/fix-headers")` loads the ES module build synchronously, which needs Node.js ^20.19.0 or >=22.12.0; on older Node.js, use `import()` instead.
55
+
56
+ ### Install
40
57
 
41
58
  ```bash
42
59
  npm i @cldmv/fix-headers
43
60
  ```
44
61
 
45
- ## Usage
62
+ As a development dependency, for the CLI in `package.json` scripts:
63
+
64
+ ```bash
65
+ npm i -D @cldmv/fix-headers
66
+ ```
67
+
68
+ ---
69
+
70
+ ## 🚀 Quick Start
71
+
72
+ Preview what would change, then write it:
73
+
74
+ ```bash
75
+ fix-headers --dry-run --verbose
76
+ fix-headers
77
+ ```
46
78
 
47
- ### ESM
79
+ From ESM:
48
80
 
49
81
  ```js
50
82
  import fixHeaders from "@cldmv/fix-headers";
@@ -52,7 +84,19 @@ import fixHeaders from "@cldmv/fix-headers";
52
84
  const result = await fixHeaders({ dryRun: true });
53
85
  ```
54
86
 
55
- ## CLI
87
+ From CommonJS:
88
+
89
+ ```js
90
+ const fixHeaders = require("@cldmv/fix-headers");
91
+
92
+ const result = await fixHeaders({ dryRun: true });
93
+ ```
94
+
95
+ `result` lists every scanned file and the changes a writing run makes; see [API](#-api) for the options and [Sample output](#-sample-output) for per-file detail.
96
+
97
+ ---
98
+
99
+ ## 💻 CLI
56
100
 
57
101
  After install, use the package binary:
58
102
 
@@ -69,42 +113,37 @@ npm run cli -- --dry-run --json
69
113
  Common CLI options:
70
114
 
71
115
  - `--dry-run`
72
- - `--check` - validate header dates without writing; exits `1` on date drift (see [Date checks](#date-checks))
116
+ - `--check` - validate header dates without writing; exits `1` on date drift (see [Date checks](#-date-checks))
73
117
  - `--fix-created-date`
74
118
  - `--strict-created-date`
75
119
  - `--normalize-date-format`
76
- - `--timezone <name>` - write new header dates in an IANA time zone (see [Time zone](#time-zone))
120
+ - `--timezone <name>` - write new header dates in an IANA time zone (see [Time zone](#-time-zone))
77
121
  - `--convert-timezone` - with `--timezone`, also rewrite existing header dates into that zone
78
122
  - `--json`
79
123
  - `--verbose` - list updated files; together with `--sample-output` or `--diff`, also list each file's field differences (`authorName: found "X", expected "Y"`)
80
124
  - `--sample-output` - print the previous/new header and detected values for each changed file
81
125
  - `--diff` - print a unified diff of each changed file's header (implies sample output)
82
- - `--force-author-update`
83
- - `--force-last-modified-author-update`
126
+ - `--force-author-update` - replace an existing `@Author`/`@Email` with the detected identity (see [Author and last modified](#-author-and-last-modified))
127
+ - `--force-last-modified-author-update` - write the detected identity as `@Last modified by` on every file, edited or not (rarely needed, see [Author and last modified](#-author-and-last-modified))
84
128
  - `--use-gpg-signer-author` (the signing key's UID name, with the OpenPGP UID comment dropped)
85
129
  - `--cwd <path>`
86
- - `--input <path>`
87
- - `--include-folder <path>` (repeatable)
130
+ - `--input <path>` (repeatable) - process these files and folders instead of the whole project: the union of every value, each file once (`--input src/a.mjs --input src/b.mjs --input scripts`). A named file whose type cannot carry a header (see [Supported file types](#-supported-file-types)) is reported as `skipped: <file> (<reason>)` and left unchanged
131
+ - `--include-folder <path>` (repeatable) - naming a folder inside a dependency folder (`--include-folder node_modules/pkg`) processes it, although discovery otherwise skips dependency folders (see [Which files are processed](#-which-files-are-processed))
88
132
  - `--include-folder-non-recursive <path>` (repeatable) - include only that folder's own files, not its subfolders
89
133
  - `--exclude-folder <path>` (repeatable)
90
134
  - `--include-extension <ext>` (repeatable)
91
135
  - `--enable-detector <id>` / `--disable-detector <id>` (repeatable)
136
+ - `--force-detector <id>` (repeatable) - turn on a force-only detector; `--force-detector markdown` gives `.md` / `.markdown` files an HTML-comment header (see [Supported file types](#-supported-file-types))
92
137
  - `--project-name <name>`
93
138
  - `--author-name <name>` / `--author-email <email>`
94
- - `--company-name <name>` - the `@Copyright` holder for every file, instead of the one the manifests provide (see [Copyright holder](#copyright-holder))
139
+ - `--company-name <name>` - the `@Copyright` holder for every file, instead of the one the manifests provide (see [Copyright holder](#-copyright-holder))
95
140
  - `--copyright-start-year <year>` - the `@Copyright` start year for every file (default: the year of each file's `@Date`)
96
- - `--spacing <n>` / `--margin <n>` - the header's layout: empty comment lines inside the header's edges (default `1`) and blank lines after it (default `2`), see [Header layout](#header-layout)
97
- - `--config <json-file>` - load options from a JSON file, which may use `extends` to build on shared configs (see [Shared configs](#shared-configs)); flags on the command line win over the file
141
+ - `--spacing <n>` / `--margin <n>` - the header's layout: empty comment lines inside the header's edges (default `1`) and blank lines after it (default `2`), see [Header layout](#-header-layout)
142
+ - `--config <json-file>` - load options from a JSON file, which may use `extends` to build on shared configs (see [Shared configs](#-shared-configs)); flags on the command line win over the file
98
143
 
99
- ### CommonJS
144
+ ---
100
145
 
101
- ```js
102
- const fixHeaders = require("@cldmv/fix-headers");
103
-
104
- const result = await fixHeaders({ dryRun: true });
105
- ```
106
-
107
- ## API
146
+ ## 🔧 API
108
147
 
109
148
  ### `fixHeaders(options?)`
110
149
 
@@ -113,23 +152,24 @@ Runs header normalization. Project/language/author/email metadata is auto-detect
113
152
  Important options:
114
153
 
115
154
  - `cwd?: string` - start directory for project detection
116
- - `input?: string` - explicit single file or folder path to process
155
+ - `input?: string | string[]` - file or folder paths to process instead of the whole project. Every path is processed: the files named plus the files discovered under the folders named, each file once, in the order given. A path that does not exist throws; an empty list means no input. A file whose type cannot carry a header is listed in the result's `skipped` instead of being changed (see [Supported file types](#-supported-file-types))
117
156
  - `dryRun?: boolean` - compute changes without writing files
118
- - `check?: boolean` - validate each existing header's dates and write nothing (implies `dryRun`). Each result entry gets `dateIssues`, and the result gets `filesWithDateDrift` and `dateAdvisories`. See [Date checks](#date-checks)
119
- - `fixCreatedDate?: boolean` - move an existing `@Date` back to the oldest of itself, the file's git first commit, and its filesystem creation time (see [Creation date](#creation-date)). It only ever moves `@Date` earlier. Off by default: an existing `@Date` is kept as written
157
+ - `check?: boolean` - validate each existing header's dates and write nothing (implies `dryRun`). Each result entry gets `dateIssues`, and the result gets `filesWithDateDrift` and `dateAdvisories`. See [Date checks](#-date-checks)
158
+ - `fixCreatedDate?: boolean` - move an existing `@Date` back to the oldest of itself, the file's git first commit, and its filesystem creation time (see [Creation date](#-creation-date)). It only ever moves `@Date` earlier. Off by default: an existing `@Date` is kept as written
120
159
  - `strictCreatedDate?: boolean` - with `check`, count a `@Date` later than the file's git first commit or filesystem creation time as drift (fails the run). Off by default, where it is an advisory
121
160
  - `normalizeDateFormat?: boolean` - write every header date in the git `%aI` form (`2026-03-01T17:59:32-08:00`), keeping each date's offset and instant. Off by default; the first run rewrites (and restamps) every managed file whose dates use the space form (`2026-03-01 17:59:32 -08:00`)
122
- - `timezone?: string` - an IANA time zone name (`America/Los_Angeles`, `UTC`, `Asia/Kolkata`, ...). Every date fix-headers writes (a new header's `@Date`, and `@Last modified time`) is expressed in that zone; the instant and its epoch never change. Unset (the default): dates are written as today. An unknown zone name throws. See [Time zone](#time-zone)
123
- - `convertTimezone?: boolean` - with `timezone`, also rewrite the existing `@Date` and `@Last modified time` values of every header into that zone, keeping each instant. Throws when `timezone` is not set. See [Time zone](#time-zone)
124
- - `sampleOutput?: boolean` - include a `sample` for each changed file: previous/new header text, a unified `diff`, per-field `issues`, and `detectedValues` (see [Sample output](#sample-output))
125
- - `configFile?: string` - load JSON options from file (resolved from `cwd`). The file may use `extends` to build on shared configs by URL, npm package path or file path (see [Shared configs](#shared-configs)); options passed in the call win over everything from files
161
+ - `timezone?: string` - an IANA time zone name (`America/Los_Angeles`, `UTC`, `Asia/Kolkata`, ...). Every date fix-headers writes (a new header's `@Date`, and `@Last modified time`) is expressed in that zone; the instant and its epoch never change. Unset (the default): dates are written as today. An unknown zone name throws. See [Time zone](#-time-zone)
162
+ - `convertTimezone?: boolean` - with `timezone`, also rewrite the existing `@Date` and `@Last modified time` values of every header into that zone, keeping each instant. Throws when `timezone` is not set. See [Time zone](#-time-zone)
163
+ - `sampleOutput?: boolean` - include a `sample` for each changed file: previous/new header text, a unified `diff`, per-field `issues`, and `detectedValues` (see [Sample output](#-sample-output))
164
+ - `configFile?: string` - load JSON options from file (resolved from `cwd`). The file may use `extends` to build on shared configs by URL, npm package path or file path (see [Shared configs](#-shared-configs)); options passed in the call win over everything from files
126
165
  - `includeExtensions?: string[]` - file extensions to process
127
- - `enabledDetectors?: string[]` - detector ids to enable (defaults to all)
166
+ - `enabledDetectors?: string[]` - detector ids to enable (defaults to every detector that is not force-only)
128
167
  - `disabledDetectors?: string[]` - detector ids to disable
168
+ - `forcedDetectors?: string[]` - force-only detector ids to turn on (currently only `"markdown"`). A forced detector is used for `input` and for discovery alike, even when `enabledDetectors` does not list it; `disabledDetectors` still turns it off. An id that is unknown or does not need forcing throws. See [Supported file types](#-supported-file-types)
129
169
  - `detectorSyntaxOverrides?: Record<string, { linePrefix?: string, lineSeparator?: string, blockStart?: string, blockLinePrefix?: string, blockEnd?: string }>` - override detector comment syntax tokens
130
170
  - `includeFolders?: Array<string | { path: string, recursive?: boolean }>` - project-relative folders to scan. A string entry is scanned recursively; `{ path, recursive: false }` includes only that folder's own files (for example `{ path: ".", recursive: false }` for the project-root files without the whole tree). Overlapping entries are collapsed, so every file is scanned once however the folders nest or are spelled (`"."` next to `"src"`, `"src"` next to `"src/core"`, `"./src"` next to `"src/"`)
131
- - `excludeFolders?: string[]` - folder names or relative paths to exclude, on top of what the ignore files exclude
132
- - `gitignore?: boolean | string | string[]` - which ignore files decide what discovery skips. Omitted (or `true`): every ignore file git honours (see [Which files are processed](#which-files-are-processed)). `false`: no ignore files, every file is processed. A path or array of paths (relative to the project root): exactly those files, parsed with `.gitignore` syntax, without asking git.
171
+ - `excludeFolders?: string[]` - folder names or relative paths to exclude, on top of what the ignore files exclude. Dependency folders are always excluded: `node_modules`, `bower_components`, `jspm_packages`, `.pnpm-store` and `.yarn` at any depth, and a `vendor` folder holding Composer's `autoload.php` or Go's `modules.txt` (see [Which files are processed](#-which-files-are-processed)); list a path inside one in `includeFolders` (or pass it as `input`) to process it anyway
172
+ - `gitignore?: boolean | string | string[]` - which ignore files decide what discovery skips. Omitted (or `true`): every ignore file git honours (see [Which files are processed](#-which-files-are-processed)). `false`: no ignore files, every file is processed except those in dependency folders. A path or array of paths (relative to the project root): exactly those files, parsed with `.gitignore` syntax, without asking git.
133
173
  - `projectName?: string` - the `@Project` value for every file, instead of the manifest name
134
174
  - `language?: string` - the reported `language` for every file (does not change comment syntax or project resolution)
135
175
  - `projectRoot?: string` - the project root for every file (the base of `@Filename` and of git history lookups) and the scan root
@@ -137,13 +177,13 @@ Important options:
137
177
  - `authorName?: string`
138
178
  - `authorEmail?: string`
139
179
  - `company?: string` - appends to `@Author` as `Name <Company>`
140
- - `forceAuthorUpdate?: boolean` - force update `@Author`/`@Email` to detected or overridden current values
141
- - `forceLastModifiedAuthorUpdate?: boolean` - force update `@Last modified by` to detected or overridden current values. Without this, an existing header's recorded `@Last modified by` identity is preserved and does not by itself trigger an update just because the running author differs (e.g. a different `git config user.name` than whoever last touched the file)
180
+ - `forceAuthorUpdate?: boolean` - replace an existing `@Author`/`@Email` with the detected (or overridden) identity. Off by default: `@Author` is the file's original author, and an existing value is never changed; a missing one is filled in. See [Author and last modified](#-author-and-last-modified)
181
+ - `forceLastModifiedAuthorUpdate?: boolean` - write the detected (or overridden) identity as `@Last modified by` on every file, whether its content was edited or not, and update files whose only difference is that identity. Off by default, and not needed for normal use: `@Last modified by` already becomes the run's identity on every file whose content was edited. See [Author and last modified](#-author-and-last-modified)
142
182
  - `useGpgSignerAuthor?: boolean` - take the detected `@Author` name from the user ID of the OpenPGP key git signs commits with (`user.signingkey`, read through `gpg.openpgp.program` / `gpg.program` / `gpg`; the first user ID that is not revoked or expired). The OpenPGP UID comment is dropped, so `Nate Corcoran (2023 PC) <nate@example.com>` becomes `Nate Corcoran` (with `company: "CLDMV"`: `Nate Corcoran <CLDMV>`). It describes whoever runs the tool, whatever the last commit is — a squash merge made by GitHub or a bot has no locally verifiable signer. With no readable OpenPGP signing key (none configured, `gpg.format` is `ssh`/`x509`, or gpg is unavailable) it falls back to the last commit's signer (`%GS`), then `git config user.name`, then the last commit's author
143
- - `companyName?: string` - the `@Copyright` holder for every file, instead of the one the project's manifests provide. There is no built-in default: unset, the holder comes from the manifests, and with none it is left out of the line (see [Copyright holder](#copyright-holder))
144
- - `copyrightStartYear?: number` - the `@Copyright` start year for every file. Unset (the default): each file's start year is the year of its own `@Date`, see [Copyright years](#copyright-years)
145
- - `spacing?: number` - empty comment lines just inside the header's opening and just before its closing. Default `1`, see [Header layout](#header-layout)
146
- - `margin?: number` - blank lines between the header and the file's next content. Default `2`, see [Header layout](#header-layout)
183
+ - `companyName?: string` - the `@Copyright` holder for every file, instead of the one the project's manifests provide. There is no built-in default: unset, the holder comes from the manifests, and with none it is left out of the line (see [Copyright holder](#-copyright-holder))
184
+ - `copyrightStartYear?: number` - the `@Copyright` start year for every file. Unset (the default): each file's start year is the year of its own `@Date`, see [Copyright years](#-copyright-years)
185
+ - `spacing?: number` - empty comment lines just inside the header's opening and just before its closing. Default `1`, see [Header layout](#-header-layout)
186
+ - `margin?: number` - blank lines between the header and the file's next content. Default `2`, see [Header layout](#-header-layout)
147
187
 
148
188
  Example:
149
189
 
@@ -171,7 +211,9 @@ const result = await fixHeaders({
171
211
  });
172
212
  ```
173
213
 
174
- ## Shared configs
214
+ ---
215
+
216
+ ## 🧩 Shared configs
175
217
 
176
218
  A config file (`--config <path>` on the CLI, `configFile` in the API) can extend other configs with `extends`, so an organisation keeps its header settings in one place instead of copying them into every repository. `extends` is a string or an array of strings, and each entry is one of:
177
219
 
@@ -210,7 +252,9 @@ A shared config can also be served from a URL, and mixed with local files:
210
252
  }
211
253
  ```
212
254
 
213
- ## Project name and root
255
+ ---
256
+
257
+ ## 🔎 Project name and root
214
258
 
215
259
  Which project a file belongs to depends on the manifests around it, not on the file's type. Comment syntax is the only thing the file's type decides.
216
260
 
@@ -229,14 +273,14 @@ A manifest claims its folder as soon as it exists and can be read, even when it
229
273
  For each file:
230
274
 
231
275
  1. **Project root.** Walk up from the file's folder. The nearest folder that at least one driver claims is the project root. `@Filename` is the file's path relative to it, and git history (`@Date`, `@Last modified time`) is looked up from it.
232
- 2. **Order.** When several drivers claim that folder, the file's native driver is read first (a `.py` file reads `python` first), then the fixed order `node`, `python`, `php`, `rust`, `go`. Language-neutral files (CSS, HTML, YAML, JSON, …) use the fixed order.
276
+ 2. **Order.** When several drivers claim that folder, the file's native driver is read first (a `.py` file reads `python` first), then the fixed order `node`, `python`, `php`, `rust`, `go`. Language-neutral files (CSS, HTML, YAML, JSONC, …) use the fixed order.
233
277
  3. **Per-field fallback.** Each value is taken from the first driver in that order whose manifest provides it. In a folder with a nameless `package.json` and a named `pyproject.toml`, every file gets the `pyproject.toml` name.
234
278
  4. **Climbing.** A value no driver at the project root provides is looked up the same way in each ancestor folder a driver claims, up to and including the scan root (`projectRoot`, else `cwd`), never above it. A nameless sub-package therefore takes the name of the repository around it. Only values climb: the project root, and with it `@Filename` and the git lookups, stays the nearest claimed folder.
235
279
  5. **Folder name.** When nothing up to the scan root provides a name, `@Project` is the project root's folder name.
236
280
 
237
281
  A folder holding `.git` is a repository boundary: neither the root search nor the climb goes past it, so a nested repository without a manifest is a project of its own. With no manifest up to the repository root, that repository root is the project root and its folder name is the name. With neither a manifest nor a repository anywhere above the file, the file's own folder is the project root: `@Project` is that folder's name and `@Filename` is `/<file name>`.
238
282
 
239
- `projectName`, `projectRoot`, `language` and `marker` override the detected values for every file. The copyright holder is resolved from the same manifests by the same rules, see [Copyright holder](#copyright-holder).
283
+ `projectName`, `projectRoot`, `language` and `marker` override the detected values for every file. The copyright holder is resolved from the same manifests by the same rules, see [Copyright holder](#-copyright-holder).
240
284
 
241
285
  For example, scanning `repo/`:
242
286
 
@@ -257,7 +301,9 @@ repo/
257
301
 
258
302
  To support another ecosystem, add a module to `src/drivers/` that exports a `driver` with `id`, `languages` (the file-type detector ids native to it), `manifests` (filenames that claim a folder, in reading order), `detect(dirPath)` (returns `detectManifests(dirPath, manifests)` from `src/drivers/shared.mjs`) and `read(detection)` (returns `{ name, company }`, each `undefined` when the manifest has none), then add it to `MANIFEST_DRIVERS` in `src/drivers/index.mjs` at its place in the fixed order.
259
303
 
260
- ## Copyright holder
304
+ ---
305
+
306
+ ## 📜 Copyright holder
261
307
 
262
308
  The holder on the `@Copyright` line (`companyName`) comes from the manifest of the project the file belongs to, read by the same drivers and with the same rules as the project name: the nearest claimed folder, the file's native driver first, the per-field fallback, and climbing up to the scan root (never past a `.git` folder). The holder climbs on its own, so a sub-package whose `package.json` has a name but no author takes the repository's author while keeping its own `@Project`. The field each driver reads is in the table above.
263
309
 
@@ -283,7 +329,9 @@ With `companyName: "Example Co"` every file gets `Copyright (c) 2026-2026 Exampl
283
329
 
284
330
  With `sampleOutput`, `detectedValues.companyName` is the resolved holder (`null` when there is none) and `detectedValues.companyNameSource` says where it came from: `{ from: "manifest", driver, manifest, dir }`, `{ from: "option" }` (`companyName`) or `{ from: "none" }`. `result.metadata` carries the same two values for the scan root. The `@Author` suffix set by `company` (`Name <Company>`) is a separate option and does not affect the holder.
285
331
 
286
- ## Creation date
332
+ ---
333
+
334
+ ## 📅 Creation date
287
335
 
288
336
  `@Date` is "oldest wins": a file cannot have been created later than its first commit or than the time the filesystem first saw it, and an `@Date` older than both (a file brought in from elsewhere, or dated before it was committed) is kept.
289
337
 
@@ -293,7 +341,37 @@ With `sampleOutput`, `detectedValues.companyName` is the resolved holder (`null`
293
341
 
294
342
  The filesystem creation time is the earlier of the file's birth time and its modification time. Content last written at the modification time existed by then, so it bounds creation even when the birth time is later (an extracted archive or a `cp -p` copy keeps the source's modification time). Where the platform reports no birth time, the modification time is used. A fresh clone or CI checkout gives every file a current filesystem time, so there the git first commit decides.
295
343
 
296
- ## Copyright years
344
+ ---
345
+
346
+ ## 👤 Author and last modified
347
+
348
+ `@Author` / `@Email` name the file's original author, and `@Last modified by` / `@Last modified time` its last edit.
349
+
350
+ - **`@Author` / `@Email`** are written once. An existing value is never changed, whoever runs the tool, unless `forceAuthorUpdate` is set. A file without one gets the detected identity.
351
+ - **`@Last modified by`** changes only when the file's **content** was edited: everything outside the header. It then becomes the identity detected for the run (`authorName` / `authorEmail`, or git as described under `useGpgSignerAuthor`). Changes fix-headers makes to the header on its own, such as the date format (`normalizeDateFormat`), an epoch repair, `@Date` (`fixCreatedDate`), a time zone conversion, the frame, spacing or margin, or the `@Project`, `@Filename` or `@Copyright` values, keep the recorded editor.
352
+ - **`@Last modified time`** is restamped with the time of the run whenever fix-headers rewrites the header, header-only rewrites included. A file whose header is already current is not touched.
353
+
354
+ Whether the content was edited is decided against git `HEAD`. The header is taken out of the file and out of its `HEAD` version (`git show HEAD:<path>`), along with the blank lines after it, and the rest is compared:
355
+
356
+ | File | Content edited? | `@Author` | `@Last modified by` | `@Last modified time` |
357
+ | ------------------------------------------------------------ | -------------------------- | -------------------------- | ------------------- | --------------------- |
358
+ | Tracked, body the same as at `HEAD`, header rewritten | no | kept | kept | now |
359
+ | Tracked, body differs from `HEAD` | yes | kept | run identity | now |
360
+ | Not in `HEAD` (new, untracked or ignored, or no commits yet) | yes | kept (filled when missing) | run identity | now |
361
+ | Outside a git work tree, header rewritten | cannot tell, treated as no | kept | kept | now |
362
+ | Header already current, content not edited | no | unchanged | unchanged | unchanged |
363
+
364
+ A missing field is filled with the run identity in every row, and a file without a header gets the run identity in both. Adding a header to a committed file is not a content edit, so a later header-only run by someone else keeps whoever was recorded then.
365
+
366
+ `@Last modified time` also moves for a content edit by the editor already recorded: when the body differs from `HEAD` and the recorded time is older than the file's last commit, the edit has not been stamped yet, so it is restamped. Once stamped, the time is newer than the last commit, and running fix-headers again changes nothing until the next commit.
367
+
368
+ The check compares the working tree with `HEAD`, so run fix-headers before committing (a pre-commit hook, or `npm run fix:headers` before `git commit`). Content committed without a run is not detected later: at that point the body matches `HEAD`.
369
+
370
+ `forceLastModifiedAuthorUpdate` writes the run identity as `@Last modified by` on every file, edited or not. It is the old behaviour for configurations that relied on it; with content-edit detection it is not needed for normal use.
371
+
372
+ ---
373
+
374
+ ## 📆 Copyright years
297
375
 
298
376
  `@Copyright: Copyright (c) <start>-<end> <companyName> All rights reserved.`
299
377
 
@@ -302,7 +380,9 @@ The filesystem creation time is the earlier of the file's birth time and its mod
302
380
 
303
381
  A file created in 2019 therefore gets `2019-2026` when fix-headers runs in 2026, not `2026-2026`.
304
382
 
305
- ## Header layout
383
+ ---
384
+
385
+ ## 📐 Header layout
306
386
 
307
387
  Two options set the shape of the header, and both apply to every file type.
308
388
 
@@ -341,7 +421,9 @@ With `spacing: 0, margin: 1` the header is compact, with no empty comment lines
341
421
 
342
422
  An existing header is restyled in place to match, so changing either option rewrites the layout of every header on the next run, and a run with unchanged options finds nothing to update. A line-comment header always keeps at least one blank line after it, even with `margin: 0`, so a comment that follows the file's header is not read as part of it.
343
423
 
344
- ## Date checks
424
+ ---
425
+
426
+ ## ✅ Date checks
345
427
 
346
428
  `check: true` / `--check` validates the `@Date` and `@Last modified time` values of every existing header and writes nothing. It compares instants, not strings, so the same moment written with another offset or in the space/`T` form is not drift. It is independent of the rendered-header diff: an author, identity, copyright, or other content difference never fails the check. Files without a header are skipped.
347
429
 
@@ -374,11 +456,13 @@ Advisories are counted in the summary and listed with `--verbose`; `--json` prin
374
456
 
375
457
  In a normal (writing) run, an epoch that disagrees with its datetime text is recomputed from the text; the datetime text itself is left as written. `created-newer-than-source` is corrected only with `fixCreatedDate` / `--fix-created-date`.
376
458
 
377
- ## Time zone
459
+ ---
460
+
461
+ ## 🌍 Time zone
378
462
 
379
463
  A header date is correct in any zone: the offset is only how the instant is shown, and the epoch in parentheses is the instant. So nothing is converted by default. `timezone` / `--timezone <name>` is for projects that want every date shown in one zone:
380
464
 
381
- - **Dates fix-headers writes** are expressed in the zone: a new header's `@Date` (from the git first commit or the filesystem, see [Creation date](#creation-date)), an `@Date` moved by `fixCreatedDate`, and the `@Last modified time` stamped on every changed file.
465
+ - **Dates fix-headers writes** are expressed in the zone: a new header's `@Date` (from the git first commit or the filesystem, see [Creation date](#-creation-date)), an `@Date` moved by `fixCreatedDate`, and the `@Last modified time` stamped on every changed file.
382
466
  - **Dates already in a header** are kept as written, unless `convertTimezone` / `--convert-timezone` is also set. That sweep rewrites existing `@Date` and `@Last modified time` values into the zone. A value whose datetime is not recognised is left alone, and so is one already in the zone's offset at that instant.
383
467
 
384
468
  Only the wall-clock time and the offset change; the instant and the epoch stay the same. The offset is the zone's offset at that instant, from the time zone data built into Node (`Intl`), so daylight saving time is applied per date: with `America/Los_Angeles`, a January date is written at `-08:00` and a July date at `-07:00`. Half-hour and other zones work the same way (`Asia/Kolkata` is `+05:30`, `Pacific/Kiritimati` is `+14:00`). The zone name is validated with `Intl`, and an unknown name fails the run.
@@ -403,14 +487,55 @@ $ fix-headers --timezone America/Los_Angeles --convert-timezone
403
487
 
404
488
  The `@Date` instant is unchanged; `@Last modified time` is restamped with the time of the run, in the zone.
405
489
 
406
- ## Which files are processed
490
+ ---
491
+
492
+ ## 📑 Supported file types
493
+
494
+ Each file type is handled by a detector, which decides the header's comment syntax. A file is given a header only when an enabled detector handles its extension:
495
+
496
+ | Detector | Extensions | Header comment | Default |
497
+ | ---------- | ----------------------------- | -------------- | ------------------------------------------ |
498
+ | `node` | `.js .mjs .cjs .ts .tsx .jsx` | `/** … */` | on |
499
+ | `json` | `.jsonc .json5 .jsonv` | `/** … */` | on |
500
+ | `css` | `.css` | `/* … */` | on |
501
+ | `html` | `.html .htm` | `<!-- … -->` | on |
502
+ | `yaml` | `.yaml .yml` | `# …` | on |
503
+ | `python` | `.py` | `# …` | on |
504
+ | `php` | `.php` | `/** … */` | on |
505
+ | `rust` | `.rs` | `/** … */` | on |
506
+ | `go` | `.go` | `/** … */` | on |
507
+ | `markdown` | `.md .markdown` | `<!-- … -->` | off; only with `--force-detector markdown` |
508
+
509
+ Every other file is skipped and left byte-for-byte unchanged, including when you name it with `--input` or add its extension with `includeExtensions`:
510
+
511
+ - **Strict JSON (`.json`)** has no comment syntax, so it never gets a header. A comment would make `package.json` and every other JSON file invalid.
512
+ - **Files with no extension, or an extension no enabled detector handles** (`.txt`, `.toml`, a disabled detector's extensions, …) are skipped instead of being given a guessed comment.
513
+ - **Markdown** is skipped unless the `markdown` detector is forced with `--force-detector markdown` (`forcedDetectors: ["markdown"]` in the API or a config file). Naming a `.md` file with `--input` does not force it. A forced header is an HTML comment, which Markdown renderers do not display; it goes below any YAML front matter (`---` … `---`), and later runs update it in place. Forcing applies to discovery too, so a repo-wide run with the option also stamps `README.md` and changelogs; to stamp one file, pass the option together with `--input <file>`. `.mdx` is not covered, because MDX does not accept HTML comments.
514
+
515
+ A skipped file is listed in the result's `skipped` array as `{ file, reason }` and counted in `filesSkipped`, not in `filesScanned` or `changes`. The CLI adds `skipped=<n>` to its summary and prints one `skipped: <file> (<reason>)` line per file:
516
+
517
+ ```sh
518
+ $ fix-headers --input package.json
519
+ fix-headers complete: scanned=0, updated=0, skipped=1, dryRun=false
520
+ skipped: package.json (no enabled detector handles .json files)
521
+ ```
522
+
523
+ ---
407
524
 
408
- By default every file with a supported extension is processed. Nothing is skipped because of its name: `node_modules`, `dist`, `build`, `coverage`, `tmp` and the like are processed unless something excludes them. Files are skipped only when:
525
+ ## 📁 Which files are processed
409
526
 
527
+ By default every file with a supported extension (see [Supported file types](#-supported-file-types)) is processed. Build output is not skipped by name: `dist`, `build`, `coverage`, `tmp` and the like are processed unless something excludes them. Files are skipped only when:
528
+
529
+ - they are inside a dependency folder (below),
410
530
  - the project's ignore files ignore them, or
411
531
  - you exclude them with `excludeFolders` / `--exclude-folder`.
412
532
 
413
- The one exception is `.git`, git's own storage, which is never walked.
533
+ `.git`, git's own storage, is never walked. Neither are dependency folders, which hold installed third-party code and never the project's own source. They are skipped at any depth (a sub-package's own `node_modules` included) and whatever the ignore files say, so a project with no `.gitignore`, a tracked dependency folder or `gitignore: false` does not stamp headers into them:
534
+
535
+ - `node_modules`, `bower_components`, `jspm_packages`, `.pnpm-store` and `.yarn`
536
+ - `vendor`, but only when it holds Composer's `vendor/autoload.php` or Go's `vendor/modules.txt`. Any other `vendor` folder is processed, because the name is also used for code the project maintains itself (front-end `vendor/` scripts, Laravel's published `resources/views/vendor`). Exclude such a folder with `excludeFolders` if it holds third-party code.
537
+
538
+ A path inside a dependency folder that you name explicitly is still processed: an `includeFolders` / `--include-folder` entry such as `node_modules/pkg`, or an `input` / `--input` file or folder.
414
539
 
415
540
  "Ignore files" means everything git itself honours: the root `.gitignore`, `.gitignore` files in subfolders (each applying to its own folder), `.git/info/exclude`, and the global excludes file (`core.excludesFile`), including negation patterns.
416
541
 
@@ -421,15 +546,19 @@ The one exception is `.git`, git's own storage, which is never walked.
421
546
 
422
547
  `gitignore: false` turns all of this off, and `gitignore: "<file>"` / `["<file>", ...]` replaces it with exactly the listed files.
423
548
 
424
- ## Notes
549
+ ---
550
+
551
+ ## 📝 Notes
425
552
 
426
553
  - `excludeFolders` supports both folder-name and nested path matching.
427
- - `includeFolders` entries never double-count a file. A folder that lies inside another recursive include is not walked a second time; the exception is a folder the outer walk never enters because `excludeFolders` excludes it (for example `node_modules/pkg` listed explicitly while `node_modules` is excluded), which keeps being walked on its own because it was named explicitly. An `includeFolders` entry does not override the ignore files: a folder they ignore contributes no files.
428
- - File discovery is described in [Which files are processed](#which-files-are-processed).
429
- - For monorepos, each file resolves its project from the nearest manifest in its parent tree (see [Project name and root](#project-name-and-root)).
554
+ - `includeFolders` entries never double-count a file. A folder that lies inside another recursive include is not walked a second time; the exception is a folder the outer walk never enters because it is a dependency folder or `excludeFolders` excludes it (for example `node_modules/pkg` listed explicitly), which keeps being walked on its own because it was named explicitly. An `includeFolders` entry does not override the ignore files: a folder they ignore contributes no files.
555
+ - File discovery is described in [Which files are processed](#-which-files-are-processed).
556
+ - For monorepos, each file resolves its project from the nearest manifest in its parent tree (see [Project name and root](#-project-name-and-root)).
430
557
  - With `sampleOutput` enabled, each changed file includes `previousValue`, `newValue`, `diff`, `issues`, and `detectedValues` in results.
431
558
 
432
- ## Sample output
559
+ ---
560
+
561
+ ## 🔍 Sample output
433
562
 
434
563
  With `sampleOutput: true` (CLI: `--sample-output` or `--diff`), every changed entry in `result.changes` carries a `sample` object. It costs nothing when the option is off.
435
564
 
@@ -437,9 +566,9 @@ With `sampleOutput: true` (CLI: `--sample-output` or `--diff`), every changed en
437
566
  - `newValue` - the header block this run writes.
438
567
  - `diff` - a ready-to-print unified diff of the header block. The `---`/`+++` lines name the file (`a/<file>` / `b/<file>`, or `/dev/null` when there was no previous header, in which case the whole new header shows as added), and hunk line numbers are file line numbers.
439
568
  - `issues` - one `{ field, previous, detected }` entry per header field whose written value differs from the existing header, in header order. Fields: `projectName`, `filename`, `createdAt`, `authorName`, `authorEmail`, `lastModifiedByName`, `lastModifiedByEmail`, `lastModifiedAt`, `copyrightStartYear`, `copyrightEndYear`, `companyName`. Values are the field text as written in the header (dates keep their `date (timestamp)` form); `previous` is `null` when the field was missing.
440
- - `detectedValues` - the metadata resolved for the file. `projectNameSource` says where `projectName` came from: `{ from: "manifest", driver, manifest, dir }` (the driver, its manifest and the folder it sits in), `{ from: "folder", dir }` (the project root's folder name) or `{ from: "option" }` (`projectName`). `copyrightStartYear` is the start year written for the file, and `copyrightStartYearSource` says where it came from: `"option"` (`copyrightStartYear`) or `"created-date"` (the year of the file's `@Date`, see [Copyright years](#copyright-years)). The run-level `result.metadata.copyrightStartYear` is the `copyrightStartYear` option, or `null` when it is not set.
569
+ - `detectedValues` - the metadata resolved for the file. `projectNameSource` says where `projectName` came from: `{ from: "manifest", driver, manifest, dir }` (the driver, its manifest and the folder it sits in), `{ from: "folder", dir }` (the project root's folder name) or `{ from: "option" }` (`projectName`). `copyrightStartYear` is the start year written for the file, and `copyrightStartYearSource` says where it came from: `"option"` (`copyrightStartYear`) or `"created-date"` (the year of the file's `@Date`, see [Copyright years](#-copyright-years)). The run-level `result.metadata.copyrightStartYear` is the `copyrightStartYear` option, or `null` when it is not set.
441
570
 
442
- `issues` compares the existing header against what is actually written, not against the raw detected metadata. fix-headers preserves an existing `@Author`/`@Email` and `@Last modified by` identity unless `forceAuthorUpdate` / `forceLastModifiedAuthorUpdate` is set, so those fields only appear when they really change. An updated file always gets a fresh `@Last modified time`, so `lastModifiedAt` is listed for every changed file that already had a header.
571
+ `issues` compares the existing header against what is actually written, not against the raw detected metadata. fix-headers preserves an existing `@Author`/`@Email` unless `forceAuthorUpdate` is set, and an existing `@Last modified by` unless the file's content was edited or `forceLastModifiedAuthorUpdate` is set (see [Author and last modified](#-author-and-last-modified)), so those fields only appear when they really change. An updated file always gets a fresh `@Last modified time`, so `lastModifiedAt` is listed for every changed file that already had a header.
443
572
 
444
573
  ```js
445
574
  const { changes } = await fixHeaders({ dryRun: true, sampleOutput: true });
@@ -472,9 +601,40 @@ issues: src/cli.mjs
472
601
  */
473
602
  ```
474
603
 
475
- ## License
604
+ ---
605
+
606
+ ## 📚 Documentation
607
+
608
+ - **[Changelog](https://github.com/CLDMV/fix-headers/tree/master/docs/changelog/)** — release notes for every version (v1 and v2)
609
+ - **[Release notes on GitHub](https://github.com/CLDMV/fix-headers/releases)** — the same notes attached to each release tag
610
+
611
+ [![CodeFactor]][codefactor_url] [![OpenSSF Scorecard]][ossf_scorecard_url] [![npms.io score]][npms_url] [![npm unpacked size]][npm_size_url] [![Repo size]][repo_size_url]
612
+
613
+ ---
614
+
615
+ ## 🤝 Contributing
616
+
617
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/CLDMV/fix-headers/issues). Pull requests target the `next` branch; releases ship from `next` to `master`.
618
+
619
+ [![Contributors]][contributors_url] [![Sponsor shinrai]][sponsor_url]
620
+
621
+ ---
622
+
623
+ ## 🔗 Links
624
+
625
+ - **npm**: [@cldmv/fix-headers](https://www.npmjs.com/package/@cldmv/fix-headers)
626
+ - **GitHub**: [CLDMV/fix-headers](https://github.com/CLDMV/fix-headers)
627
+ - **Issues**: [GitHub Issues](https://github.com/CLDMV/fix-headers/issues)
628
+ - **Changelog**: [docs/changelog/](https://github.com/CLDMV/fix-headers/tree/master/docs/changelog/)
629
+ - **Releases**: [GitHub Releases](https://github.com/CLDMV/fix-headers/releases)
630
+
631
+ ---
632
+
633
+ ## 📄 License
634
+
635
+ [![GitHub license]][github_license_url] [![npm license]][npm_license_url]
476
636
 
477
- Apache-2.0
637
+ Apache-2.0 © Shinrai / CLDMV
478
638
 
479
639
  <!-- Badge definitions -->
480
640
  <!-- [github release]: https://img.shields.io/github/v/release/CLDMV/fix-headers?style=for-the-badge&logo=github&logoColor=white&labelColor=181717 -->
@@ -498,3 +658,17 @@ Apache-2.0
498
658
  [contributors_url]: https://github.com/CLDMV/fix-headers/graphs/contributors
499
659
  [sponsor shinrai]: https://img.shields.io/github/sponsors/shinrai?style=for-the-badge&logo=githubsponsors&logoColor=white&labelColor=EA4AAA&label=Sponsor
500
660
  [sponsor_url]: https://github.com/sponsors/shinrai
661
+ [codefactor]: https://img.shields.io/codefactor/grade/github/CLDMV/fix-headers?style=for-the-badge&logo=codefactor&logoColor=white&labelColor=F44A6A
662
+ [codefactor_url]: https://www.codefactor.io/repository/github/cldmv/fix-headers
663
+ [openssf scorecard]: https://img.shields.io/ossf-scorecard/github.com/CLDMV/fix-headers?style=for-the-badge&label=OpenSSF%20Scorecard
664
+ [ossf_scorecard_url]: https://scorecard.dev/viewer/?uri=github.com/CLDMV/fix-headers
665
+ [npms.io score]: https://img.shields.io/npms-io/final-score/%40cldmv%2Ffix-headers?style=for-the-badge&logo=npms&logoColor=white&labelColor=0B5D57
666
+ [npms_url]: https://npms.io/search?q=%40cldmv%2Ffix-headers
667
+ [npm unpacked size]: https://img.shields.io/npm/unpacked-size/%40cldmv%2Ffix-headers.svg?style=for-the-badge&logo=npm&logoColor=white&labelColor=CB3837
668
+ [npm_size_url]: https://www.npmjs.com/package/@cldmv/fix-headers
669
+ [repo size]: https://img.shields.io/github/repo-size/CLDMV/fix-headers?style=for-the-badge&logo=github&logoColor=white&labelColor=181717
670
+ [repo_size_url]: https://github.com/CLDMV/fix-headers
671
+ [github license]: https://img.shields.io/github/license/CLDMV/fix-headers.svg?style=for-the-badge&logo=github&logoColor=white&labelColor=181717
672
+ [github_license_url]: https://github.com/CLDMV/fix-headers/blob/HEAD/LICENSE
673
+ [npm license]: https://img.shields.io/npm/l/%40cldmv%2Ffix-headers.svg?style=for-the-badge&logo=npm&logoColor=white&labelColor=CB3837
674
+ [npm_license_url]: https://www.npmjs.com/package/@cldmv/fix-headers