Skip to content

deps: bump @vitest/coverage-v8 from 5.0.0 to 5.0.1 in the patch group - #49

Merged
cldmv-bot[bot] merged 1 commit into
nextfrom
dependabot/npm_and_yarn/next/patch-c24ada480d
Sep 23, 2026
Merged

cldmv-bot[bot] merged 1 commit into
nextfrom
dependabot/npm_and_yarn/next/patch-c24ada480d

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 23, 2026

Copy link
Copy Markdown

Bumps the patch group with 1 update: @vitest/coverage-v8.

Updates @vitest/coverage-v8 from 5.0.0 to 5.0.1

Release notes

Sourced from @​vitest/coverage-v8's releases.

v5.0.1

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
Commits

Dependabot compatibility score

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 commands and options

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

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

@cldmv-bot cldmv-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved by CLDMV-bot: patch bump from 5.0.0 to 5.0.1.

@cldmv-bot
cldmv-bot Bot enabled auto-merge September 23, 2026 21:34
@cldmv-bot
cldmv-bot Bot merged commit 51e3ebf into next Sep 23, 2026
26 checks passed
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/next/patch-c24ada480d branch September 23, 2026 21:35
cldmv-bot Bot added a commit that referenced this pull request Sep 29, 2026
# @cldmv/fix-headers v2.0.0 Changelog

**Release Date**: September 2026
**Release Type**: Major
**Branch**: `release/2.0.0`

---

## Overview

Version 2.0.0 is the largest release of fix-headers so far. The package is now built: npm ships a bundled `dist/` and `bin/` instead of the raw `src/` tree, with a 1.2 kB CommonJS wrapper around the ES module build. Header dates can be validated without writing anything (`--check`), `@Date` follows an "oldest wins" rule, and mismatched epochs are repaired. `sampleOutput` gains a unified diff and per-field issues (`--diff`), `includeFolders` accepts non-recursive entries and no longer processes a file twice when entries overlap, and a config file can `extends` a shared config by URL, npm package or path.

It is a major release because four changes alter what an existing setup gets without any change on its side. The published package no longer contains `src/`. File discovery no longer skips `node_modules`, `dist`, `build`, `coverage`, `tmp`, `.next` and `.turbo` by name: only the project's ignore files (everything git honours) and your own `excludeFolders` decide. And `@Project` and the project root now come from the project's manifest (`package.json`, `pyproject.toml`, `Cargo.toml`, …) whatever the file's type, so CSS, HTML, YAML, JSON and some Python files get a different `@Project` (and sometimes `@Filename`) on the next run. And the `@Copyright` holder no longer defaults to "Catalyzed Motivation Inc.": it comes from the project's manifest author, and is left out when there is none.

**Compatibility.** No option was removed and the `fixHeaders` API is unchanged, but the first run after upgrading can process files it used to skip and rewrite `@Project`, `@Filename`, the `@Copyright` holder and years, and epoch values in existing headers. Read [Breaking Changes](#-breaking-changes) and the [Upgrade notes](#upgrade-notes), and run with `--dry-run --diff --verbose` (or `--check`) once before writing.

---

## 💥 Breaking Changes

### The package ships `dist/` and `bin/`, not `src/` ([#56](#56), [#65](#65))

The package is now bundled with tsup, the same way `@cldmv/vitest-runner` is built, instead of shipping `src/` as-is:

- `dist/index.mjs` (ESM), `dist/index.cjs` (CJS) and `bin/fix-headers.mjs` (CLI) are build artifacts, rebuilt by `prepack` before every pack/publish. `main`, `module`, `exports` and `bin` point at them, and `files` ships `dist/`, `types/` and `bin/` (no source maps). `src/` and the root `index.mjs` / `index.cjs` shims are no longer published.
- `dist/index.cjs` is a thin wrapper that `require()`s `dist/index.mjs` (Node 22.12+ loads ES modules synchronously) and returns its default export, so `require("@cldmv/fix-headers")` still returns the `fixHeaders` function itself. The first build bundled a second full copy of the library into the CJS file; [#65](#65) replaced it with the wrapper.
- The output is minified with `keepNames`, so `fixHeaders.name` and stack traces stay readable. Published sizes: `dist/index.cjs` 1.2 kB, `dist/index.mjs` 34.7 kB, `bin/fix-headers.mjs` 43.2 kB.
- Detectors are imported statically instead of being discovered by reading `src/detectors/` at runtime, which a bundle cannot do.
- A `fix-headers-dev` export condition resolves the package to `src/` for development against the source.

**Migration.** Import the package entry point: `import fixHeaders from "@cldmv/fix-headers"` or `const fixHeaders = require("@cldmv/fix-headers")`, and run the CLI through the `fix-headers` binary. Deep imports of `@cldmv/fix-headers/src/...`, file-path imports into `node_modules/@cldmv/fix-headers/src/…`, and references to the root `index.mjs` / `index.cjs` no longer resolve, because those files are not in the package. The `require()` entry relies on Node 22.12+, which `engines` has required since v1.3.12.

Closes [#18](#18).

### Discovery processes every folder unless an ignore file or `excludeFolders` excludes it ([#73](#73))

Discovery used to skip `node_modules` at any depth and `dist`, `build`, `coverage`, `tmp`, `.next` and `.turbo` at the project root by name, whatever the project's own rules said, and it read only the root `.gitignore`. Now nothing is skipped because of its name; `.git` (git's own storage) is the only folder never walked.

"Ignore files" now means everything git honours. Inside a git work tree, one `git ls-files --cached --others --exclude-standard` per repository decides, so nested `.gitignore` files, `.git/info/exclude`, `core.excludesFile` and negations all apply, and tracked files are processed even when an ignore pattern matches them. Outside a work tree (or without git), the `.gitignore` files under the discovery root are parsed, each scoped to its own folder. A nested repository or submodule applies its own rules to its own files, and a discovery root that the enclosing repository ignores is treated as a standalone folder. `gitignore: false` and explicit `gitignore` paths keep working.

The internal `ALWAYS_IGNORE_FOLDERS`, `ROOT_IGNORE_FOLDERS` and `DEFAULT_IGNORE_FOLDERS` constants are gone from `src/constants.mjs`; they were never part of the package's exports.

**Migration.** Most projects already ignore `node_modules`, `dist` and `coverage` in `.gitignore` and see no difference. A project that does not (a committed `dist/`, an unignored `tmp/`, a run with `gitignore: false`, or a folder outside any git repository without a `.gitignore`) will get headers written into those files. To keep a folder out, add it to `.gitignore` (an anchored pattern such as `/dist/` matches only at the root, like the old built-in rule) or to `excludeFolders` / `--exclude-folder` (a bare name such as `"dist"` matches at any depth). Tracked files that match an ignore pattern are now processed as well; exclude them with `excludeFolders` if they should stay untouched.

Closes [#71](#71).

### `@Project` and the project root come from the project's manifest, whatever the file type ([#72](#72), [#75](#75), [#83](#83))

Each file-type detector used to carry its own marker list and name rule, so the same project produced different `@Project` values per file type: a CSS file always got its folder name even next to a `package.json`, an HTML file got the name of the nearest folder holding `index.html` or a vite/next config (or its own folder), and YAML and JSON files only ever read a `package.json`, so in a Python, PHP, Rust or Go project they fell back to a folder name.

[#72](#72) made CSS and HTML read the `package.json` name. [#75](#75) then moved project resolution out of the detectors altogether and into per-ecosystem manifest drivers (`node`, `python`, `php`, `rust`, `go` in `src/drivers/`). Detectors now only decide comment syntax.

- The nearest folder any driver claims is the project root: the base of `@Filename` and of git history lookups.
- When several drivers claim that folder, the file's native driver is read first (a `.py` file reads `python` first), then `node`, `python`, `php`, `rust`, `go`. Each field comes from the first manifest that provides it.
- A value missing at the project root climbs to the next claimed ancestor, up to the scan root and never past a folder holding `.git`. Only values climb; the root, and with it `@Filename`, stays the nearest claimed folder. A nameless sub-package (`{ "private": true }`) therefore takes the name of the repository around it.
- Without any manifest name, the project root's folder name is used; with no manifest up to a repository root, that repository root; with neither, the file's own folder.
- The Python driver reads `pyproject.toml` (`[project].name`, then `[tool.poetry].name`), `setup.cfg` (`[metadata] name`, new) and `setup.py`. `requirements.txt` no longer claims a folder: it carries no name and often sits in folders that are not projects (`docs/requirements.txt`).
- `@Project` is the name the package is published under. For an npm package that's its `package.json` `name`; a VS Code extension (a `package.json` with `engines.vscode` and a `publisher`) can't use an npm scope, so it gets its Marketplace identifier `<publisher>.<name>`, e.g. `cldmv.jsonv-vscode` instead of the bare `jsonv-vscode` ([#83](#83)).
- `detectedValues` reports `projectNameSource`: `{ from: "manifest", driver, manifest, dir }`, `{ from: "folder", dir }` or `{ from: "option" }`.

**Migration.** Expect the next writing run to rewrite the headers of files whose `@Project` or `@Filename` changes: every file of a VS Code extension (its `@Project` becomes `<publisher>.<name>`), CSS, HTML, YAML and JSON files (they now get the manifest name instead of a folder name), files in a nameless sub-package (they take the enclosing project's name), and Python files whose nearest marker was `requirements.txt` (they resolve to the next real manifest). `@Filename` moves wherever the project root moves, for example for an HTML file whose root used to be the nearest `index.html` or vite/next config folder, or a CSS file whose root used to be the nearest `postcss.config.*` folder. Preview the change with `--dry-run --diff --verbose`; `detectedValues.projectNameSource` in the sample output names the manifest each value came from. To keep a fixed value, pass `projectName` and/or `projectRoot` (per run or in the config file).

Closes [#70](#70), [#74](#74) and [#82](#82).

### The `@Copyright` holder comes from the project's manifest, with no built-in default ([#91](#91))

`companyName` used to default to a hard-coded `"Catalyzed Motivation Inc."`, so anyone running fix-headers without the option stamped that company on their own files. There is no built-in holder any more. Unless `companyName` / `--company-name` is set, the holder is read from the manifest of the project the file belongs to, by the same drivers and with the same nearest-folder, native-driver-first and climbing rules as `@Project`; the holder climbs on its own, so a sub-package without an author takes the repository's.

| Driver | Holder                                                                                                                                                |
| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| node   | `package.json` `author.company`, else `author.name`, else the name part of a string `author` (`"Name <email> (url)"`)                                 |
| python | `pyproject.toml` `[project].authors[0].name`, then the name part of `[tool.poetry].authors[0]`; `setup.cfg` `[metadata] author`; `setup.py` `author=` |
| php    | `composer.json` `authors[0].name`                                                                                                                     |
| rust   | the name part of `Cargo.toml` `[package].authors[0]`                                                                                                  |
| go     | none (`go.mod` has no author)                                                                                                                         |

With no holder anywhere up to the scan root, the holder is left out: `Copyright (c) 2019-2026 All rights reserved.` `detectedValues` and `result.metadata` report `companyName` (`null` when there is none) and `companyNameSource`: `{ from: "manifest", driver, manifest, dir }`, `{ from: "option" }` or `{ from: "none" }`. The internal `DEFAULT_COMPANY_NAME` constant is gone; it was never exported from the package entry.

**Migration.** A project that relied on the old default, or wants a holder other than its manifest's author, sets `companyName` (per run or in the config file). The CLDMV repositories get `"companyName": "Catalyzed Motivation Inc."` from the shared `@cldmv/configs` config. Everyone else should expect the next writing run to rewrite `@Copyright` to their manifest's author, or to drop the holder when no manifest names one; preview it with `--dry-run --diff --verbose`.

Closes [#90](#90).

---

## ✨ Features

### Config files can extend shared configs ([#88](#88))

A config file (`--config <path>`, or `configFile` in the API) can set `extends` to a string or an array of strings, so an organisation keeps its header settings in one place instead of copying them into every repository. Each entry is:

- an **https URL**, fetched on every run with no local cache, so every run uses the current shared config. A failed request, a non-2xx response or a body that is not a JSON object fails the run with an error naming the URL. Plain `http://` is accepted only for `localhost`, `127.0.0.1` and `[::1]`;
- an **npm package path** such as `@cldmv/configs/fix-headers.json`, resolved from the config file's folder the way Node resolves packages, `exports` map included;
- a **relative or absolute file path**, resolved from the config file's folder.

Extended configs apply in order and the file's own settings go on top; plain objects merge key by key, while arrays and scalars replace. Chains work, a cycle is an error, relative references inside a fetched config resolve against its URL, and options passed on the command line or to `fixHeaders()` still win over everything from files.

Closes [#87](#87).

### Header date validation, oldest-wins `@Date` and epoch repair ([#67](#67))

`check` / `--check` validates the `@Date` and `@Last modified time` of every existing header, writes nothing, and exits `1` when it finds date drift. The checks compare instants rather than strings, so the same moment written with another offset or in the space/`T` form is not drift, and they run independently of the rendered-header diff, so an author or copyright difference never fails them:

| Check                                | Fails the run                           | Meaning                                                                                  |
| ------------------------------------ | --------------------------------------- | ---------------------------------------------------------------------------------------- |
| `created-format` / `modified-format` | yes                                     | the value is not a recognised `<datetime> (<epoch>)` pair                                |
| `created-epoch` / `modified-epoch`   | yes                                     | the epoch does not decode to the datetime text                                           |
| `created-newer-than-source`          | with `strictCreatedDate`, else advisory | `@Date` is later than the older of the git first commit and the filesystem creation time |
| `modified-git`                       | no (advisory)                           | `@Last modified time` is not the git last-commit date                                    |

`@Date` now follows "oldest wins" across the existing header value, the git first commit and the filesystem creation time (the earlier of birth time and modification time). An `@Date` older than git or the filesystem is correct and is never moved forward.

- A new header takes the older of the git first commit and the filesystem creation time (git wins a tie). Previously the git first commit always won.
- An existing `@Date` is kept as written, except that its epoch is recomputed from the datetime text when the two disagree.
- `fixCreatedDate` / `--fix-created-date` moves an existing `@Date` to the oldest of the three sources, so it only ever moves earlier.
- `strictCreatedDate` / `--strict-created-date` makes `created-newer-than-source` fail `--check` instead of being an advisory.
- `normalizeDateFormat` / `--normalize-date-format` writes every header date in the git `%aI` form (`2026-03-01T17:59:32-08:00`), keeping each date's offset and instant.

Dates read from git are now written with a numeric `+00:00` offset on every git version. Git 2.45 and later print a UTC `%aI` date as `…Z` where older versions print `+00:00`, so the same file could get a different `@Date` or `@Last modified time` text depending on the installed git.

Closes [#31](#31).

### Opt-in time zone for header dates ([#81](#81))

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. Nothing is converted by default; two options cover projects that want every date shown in one zone.

- `timezone` / `--timezone <name>` takes an IANA zone name (`America/Los_Angeles`, `UTC`, `Asia/Kolkata`, …) and writes the dates fix-headers produces in that zone: a new header's `@Date`, an `@Date` moved by `fixCreatedDate`, and the `@Last modified time` stamped on a changed file. The offset is the zone's offset at that instant, read from Node's built-in time zone data (`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`. The instant and the epoch never change. An unknown zone name fails the run, and when `timezone` is unset the output is exactly what it was before.
- `convertTimezone` / `--convert-timezone` (requires `timezone`, and throws without it) sweeps the existing `@Date` and `@Last modified time` values of every header into the zone, keeping each instant. A value whose datetime is not recognised is left alone, and so is one already at the zone's offset for that instant. A converted value keeps its shape: the space form (`2026-01-18 20:39:48 -08:00`) stays in the space form and the T-form stays in the T-form; with `normalizeDateFormat` every date is written in the T-form.
- As with epoch repair and `normalizeDateFormat`, a rewritten date is a header change, so the first `--convert-timezone` run restamps `@Last modified time` on every file it converts.

`--check` is unchanged: a date shown in another zone than `timezone` is the same instant, not drift.

Closes [#79](#79).

### Unified diff and per-field issues in sample output ([#66](#66))

With `sampleOutput: true`, each changed entry's `sample` now also carries:

- `diff`: a ready-to-print unified diff of the header block (`--- a/<file>` / `+++ b/<file>`, `/dev/null` when the file had no header), with file line numbers in the hunks. It is a small built-in line-level LCS, so the package still depends only on `ignore`.
- `issues`: one `{ field, previous, detected }` entry per header field whose written value differs from the existing header (project name, filename, created date, author name and email, last-modified identity and time, copyright years and company). Preserved fields, such as the author unless `forceAuthorUpdate` is set, only appear when they actually change.

On the CLI, `--diff` prints each changed file's header diff (and implies `--sample-output`), and `--verbose` together with `--sample-output` or `--diff` prints each file's field differences as `field: found "X", expected "Y"`.

Closes [#34](#34).

### Non-recursive include folders ([#60](#60))

`includeFolders` entries may now be objects, `{ path: string, recursive?: boolean }`. `recursive: false` includes only that folder's own files, so `{ path: ".", recursive: false }` covers the project-root files without walking the whole tree. Plain string entries stay recursive. The CLI gains a repeatable `--include-folder-non-recursive <path>` flag.

---

## 🐛 Bug Fixes

### The copyright start year is the year of the file's `@Date` ([#89](#89))

Without `copyrightStartYear`, the start year on the `@Copyright` line was the year of the run, the same for every file, so a file created in 2019 got `2026-2026` the first time fix-headers ran in 2026. It is now the year of the file's `@Date` as resolved for that run: the existing value, the oldest of the git first commit and the filesystem creation time for a new header, or the earlier date `fixCreatedDate` moves it to. The year is read in the zone the date is written in (`timezone` when set, else the date's own offset), so `2019-12-31T23:30:00-08:00` gives `2019`, and `2020` with `timezone: "UTC"`. `copyrightStartYear` still sets one start year for every file, and the end year is still the year of the run. `result.metadata.copyrightStartYear` is now `null` when the option is not set, and each file's `detectedValues` reports its `copyrightStartYear` and `copyrightStartYearSource` (`"option"` or `"created-date"`).

Closes [#85](#85).

### `package.json` `module` points at the built ES module ([#78](#78))

[#56](#56) moved the build to `dist/` and deleted the root `index.mjs`, but the `module` field still named `./index.mjs`, a file the package no longer ships. It now points at `dist/index.mjs`, matching `exports["."].import`, and the tsup build integration test checks that every entry point `package.json` names (`main`, `module`, `types`, the `import` / `require` / `types` targets of `exports["."]`, and `bin`) exists.

Closes [#77](#77).

### Overlapping include folders process each file once ([#60](#60))

`discoverFiles()` walked every `includeFolders` entry independently and concatenated the results, so a file under two entries (`"."` next to `"src"`, `"src"` next to `"src/core"`, or the same folder spelled twice) was returned, and processed with its git lookups, once per entry. One real include list discovered 1920 paths for 963 files. Roots are now canonicalized up front, a root already covered by another is dropped before any walk, surviving roots are walked in input order, and the result is de-duplicated by path. An entry that is neither a string nor `{ path }` now throws a `TypeError` instead of failing inside `path.join`.

Closes [#59](#59).

### GPG signer author: UID comment dropped, name taken from the signing key ([#62](#62), [#69](#69))

With `useGpgSignerAuthor`, the author name kept the OpenPGP user-ID comment, so a key UID `Jane Doe (laptop) <jane\@example.com>` produced `\@author: Jane Doe (laptop)`. The comment is now dropped (nested and escaped parentheses included); parentheses elsewhere in the name are kept ([#62](#62)).

The option also read the last commit's signer (`%GS`). On a squash-merged branch the tip is a merge made by GitHub or a release bot whose signature cannot be verified locally, so `%GS` was empty and the author silently fell back to `git config user.name`. The name now comes from the user ID of the OpenPGP key git signs with (`user.signingkey`, listed through `gpg.openpgp.program` / `gpg.program` / `gpg`, first user ID that is not revoked or expired). Without a readable OpenPGP key it falls back to `%GS`, `user.name` and the last commit's author as before ([#69](#69)).

Closes [#61](#61) and [#68](#68).

### Header field parsing without polynomial regexes ([#66](#66))

CodeQL flagged the `@Last modified by` and `@Copyright` splitters in `src/header/fields.mjs` as polynomial ReDoS (`js/polynomial-redos`): a crafted 20,000-character header value took minutes to parse. Both are now string scans plus anchored, unambiguous regex pieces. They return exactly what the old expressions did (checked against them on 200,000 random values), and 100,000-character adversarial values parse in about a millisecond.

### No more `vitest` peer dependency ([#51](#51))

`package.json` declared `vitest >=1.0.0` as a peer dependency since the initial commit, although no shipped file imports it. npm 7+ therefore installed vitest into every consumer's tree. The entry is removed; vitest stays a dev dependency.

---

## 🔧 CI & tooling

- **v4 workflows synced** with the `CLDMV/.github` templates (v4.29.0, then v4.29.2), plus the missing `release-merge`, `member-auto-merge`, `dependabot-recreate`, `pr-notify` and `provenance` callers ([#53](#53), [#63](#63)).
- **Bundle-size tracking** via the `bundle-size` workflow, and the `release-merge` workflow list restored to the template's ([#64](#64)).
- **Lint and format**: the CLDMV eslint + prettier configuration, `lint` / `lint:fix` / `format` / `format:check` scripts, a report-only pre-commit hook, and a pass fixing the existing findings ([#55](#55)).
- **Tests run through `@cldmv/vitest-runner`** (`npm test`, `npm run coverage`), one process per test file with merged coverage; coverage stays at 100% ([#54](#54)).
- **Test isolation**: the suite runs isolated from the machine's global and system git config, so a local signing key or `user.name` cannot change results ([#69](#69)); the timezone-offset test passes in any local zone ([#67](#67)); the tsup build and overlapping-include integration tests get a 30 s timeout ([#58](#58), [#69](#69)).
- **LICENSE**: the Apache-2.0 license text is now in the repository and the published tarball; `package.json` already declared the license ([#57](#57)).

---

## 📚 Documentation

- **NEW:** [docs/changelog/v2/v2.0.0.md](./v2.0.0.md) — this changelog.
- README — new **Shared configs**, **Project name and root**, **Copyright holder**, **Creation date**, **Copyright years**, **Date checks**, **Time zone**, **Which files are processed** and **Sample output** sections, the new options and CLI flags, and a **What's New** section.

---

## 🔧 Dependencies

- `ignore` 7.0.8 → 7.0.9 ([#45](#45)) — the only runtime dependency.
- `vitest` 5.0.0 → 5.0.1 ([#48](#48)), `@vitest/coverage-v8` 5.0.0 → 5.0.1 ([#49](#49)), `@types/node` 26.4.1 → 26.6.2 ([#46](#46), [#50](#50)) — development only.
- The `vitest` peer dependency is removed ([#51](#51)).
- TypeScript stays on the 6.x line (6.0.3) for generating the published `types/` declarations: TypeScript 7.0 ships no stable compiler API yet, so the 7.0 bump was reverted until 7.1 ([#86](#86)). Development only.
- New development dependencies for the build and lint setup: `tsup`, `@cldmv/vitest-runner`, eslint, prettier and their CLDMV plugins ([#54](#54), [#55](#55), [#56](#56)).

---

## Upgrade notes

Upgrading from v1.x to v2.0.0 needs no code change for anyone who imports the package entry point, but several defaults changed. Before the first writing run, preview it: `fix-headers --dry-run --diff --verbose` shows every file that would change and which fields differ, and `fix-headers --check` reports date drift without writing.

- **Deep imports into `src/` stop resolving** ([#56](#56)). Import `@cldmv/fix-headers` itself and use the `fix-headers` binary; see [the package ships `dist/` and `bin/`](#the-package-ships-dist-and-bin-not-src-56-65).
- **Folders that were skipped by name are now processed** ([#73](#73)) unless `.gitignore` or `excludeFolders` lists them. Tracked files that match an ignore pattern are processed too, while nested `.gitignore` files, `.git/info/exclude` and `core.excludesFile` now keep the files they ignore out of the run.
- **`@Project` and `@Filename` can change** for CSS, HTML, YAML, JSON and some Python files and for nameless sub-packages ([#72](#72), [#75](#75)), and those headers are rewritten on the next run. Pin them with `projectName` / `projectRoot` if needed.
- **The `@Copyright` holder changes unless `companyName` is set** ([#91](#91)): it becomes the manifest's author, or is left out when no manifest names one, instead of "Catalyzed Motivation Inc.". Set `companyName` to keep a fixed holder; see [the `@Copyright` holder](#the-copyright-holder-comes-from-the-projects-manifest-with-no-built-in-default-91).
- **Copyright start years can move earlier** ([#89](#89)): without `copyrightStartYear`, a file whose `@Date` is in an earlier year than the one its start year was written in gets its `@Date` year, and the header is rewritten on the next run. Set `copyrightStartYear` to keep one start year for every file.
- **Headers with a wrong epoch are rewritten** ([#67](#67)). In a writing run, an `@Date` or `@Last modified time` whose `(epoch)` does not match its datetime text gets the epoch recomputed from the text; like any updated file, it also gets a fresh `@Last modified time`. The datetime text itself is left as written.
- **New headers can get an earlier `@Date`** ([#67](#67)): the older of the git first commit and the filesystem creation time, where previously git always won. On a fresh clone or CI checkout the filesystem time is current, so git still decides there. Existing `@Date` values are only moved with `--fix-created-date`.
- **UTC dates from git are written as `+00:00`** instead of `Z` on git 2.45 and later ([#67](#67)).
- **`useGpgSignerAuthor` can resolve a different name** ([#62](#62), [#69](#69)): the configured signing key's user ID without its comment, instead of the last commit's signer or the `git config user.name` fallback. Existing `@Author` and `@Last modified by` identities are still preserved unless a `force…` option is set.
- **An invalid `includeFolders` entry now throws a `TypeError`** ([#60](#60)): anything that is neither a string nor `{ path }`. Overlapping entries no longer produce duplicate entries in `result.changes`.
- **npm no longer installs `vitest` alongside fix-headers** ([#51](#51)). A project that relied on getting it that way must declare it itself.



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

- @Shinrai

</details>

---

<!-- coverage-start -->

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

| Metric | Coverage |
|--------|----------|
| Statements | 100.0% |
| Branches   | 100.0% |
| Functions  | 100.0% |
| Lines      | 100.0% |

*Avg: **100.0%** · `3f3799d` · 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.

0 participants