@cldmv/fix-headers 2.5.1 → 2.6.1

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.
Files changed (47) hide show
  1. package/README.md +9 -6
  2. package/dist/cli.mjs +2 -1
  3. package/dist/core/declaration-sources.mjs +4 -0
  4. package/dist/core/fix-headers.mjs +2 -2
  5. package/dist/index.cjs +16 -16
  6. package/package.json +8 -8
  7. package/types/src/cli.d.mts +15 -0
  8. package/types/src/config/load.d.mts +15 -0
  9. package/types/src/constants.d.mts +15 -0
  10. package/types/src/core/declaration-sources.d.mts +58 -0
  11. package/types/src/core/file-discovery.d.mts +15 -0
  12. package/types/src/core/fix-headers.d.mts +16 -0
  13. package/types/src/core/ignore-rules.d.mts +15 -0
  14. package/types/src/detect/project.d.mts +15 -0
  15. package/types/src/detectors/c.d.mts +15 -0
  16. package/types/src/detectors/css.d.mts +15 -0
  17. package/types/src/detectors/go.d.mts +15 -0
  18. package/types/src/detectors/html.d.mts +15 -0
  19. package/types/src/detectors/index.d.mts +15 -0
  20. package/types/src/detectors/json.d.mts +15 -0
  21. package/types/src/detectors/markdown.d.mts +15 -0
  22. package/types/src/detectors/node.d.mts +15 -0
  23. package/types/src/detectors/php.d.mts +15 -0
  24. package/types/src/detectors/python.d.mts +15 -0
  25. package/types/src/detectors/rust.d.mts +15 -0
  26. package/types/src/detectors/top-lines.d.mts +15 -0
  27. package/types/src/detectors/yaml.d.mts +15 -0
  28. package/types/src/drivers/go.d.mts +15 -0
  29. package/types/src/drivers/index.d.mts +15 -0
  30. package/types/src/drivers/node.d.mts +15 -0
  31. package/types/src/drivers/php.d.mts +15 -0
  32. package/types/src/drivers/python.d.mts +15 -0
  33. package/types/src/drivers/rust.d.mts +15 -0
  34. package/types/src/drivers/shared.d.mts +15 -0
  35. package/types/src/header/dates.d.mts +15 -0
  36. package/types/src/header/fields.d.mts +15 -0
  37. package/types/src/header/parser.d.mts +15 -0
  38. package/types/src/header/syntax.d.mts +15 -0
  39. package/types/src/header/template.d.mts +15 -0
  40. package/types/src/index.d.mts +15 -0
  41. package/types/src/utils/diff.d.mts +2 -1
  42. package/types/src/utils/fs.d.mts +15 -0
  43. package/types/src/utils/git.d.mts +15 -0
  44. package/types/src/utils/text.d.mts +2 -1
  45. package/types/src/utils/time.d.mts +2 -1
  46. package/types/devcheck.d.mts +0 -1
  47. package/types/index.d.mts +0 -2
package/README.md CHANGED
@@ -14,17 +14,17 @@ Headers stay correct without hand-editing: `@Date` follows the file's real creat
14
14
 
15
15
  ## ✨ What's New
16
16
 
17
- ### Latest: v2.5.1 (November 2026)
17
+ ### Latest: v2.6.1 (November 2026)
18
18
 
19
- - **Unbundled build** — `dist/` now mirrors `src/` one file per module instead of a bundle, and the CLI (`dist/cli.mjs`) imports the library rather than shipping its own copy. The `fix-headers` command is unchanged; the `bin/` folder is no longer published ([#206](https://github.com/CLDMV/fix-headers/pull/206), fixes [#205](https://github.com/CLDMV/fix-headers/issues/205)).
20
- - [View full v2.5.1 Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.5.1.md)
19
+ - **Dev tooling only, no behaviour changes** — the repository moves to `@cldmv/vitest-runner` 1.11.3 and `@cldmv/configs` 1.5.0, and `dependabot.yml` takes the CLDMV/.github v4.47.0 groups ([#219](https://github.com/CLDMV/fix-headers/pull/219)). fix-headers works exactly as in v2.6.0.
20
+ - [View full v2.6.1 Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.6.1.md)
21
21
 
22
22
  ### Recent Releases
23
23
 
24
+ - **v2.6.0** (November 2026) — headerless `tsc` declarations take their source's header dates and author (new `tsconfig` option), the generic CommonJS shim, and `types/` generated at build time ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.6.0.md))
25
+ - **v2.5.1** (November 2026) — `dist/` is built one file per module instead of a bundle, and the CLI (`dist/cli.mjs`) imports the library; `bin/` is no longer published ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.5.1.md))
24
26
  - **v2.5.0** (November 2026) — generated declarations carrying `tsc`'s copy of their source's header are restamped for where they ship; `rewriteDeclarationCopies: false` opts out ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.5.0.md))
25
27
  - **v2.4.0** (November 2026) — `@Filename` is written without a leading slash (`src/index.mjs`), and declarations carrying `tsc`'s copy of their source's header are skipped ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.4.0.md))
26
- - **v2.3.0** (November 2026) — `.mts`/`.cts` in the `node` detector and a new `c` detector for C/C++; C files carrying another holder's license notice are skipped ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.3.0.md))
27
- - **v2.2.7** (November 2026) — no library code changed: the tests get the `fix-headers-dev` condition through `devCondition()`, and `npm run test:dist` runs the same suite against `dist/` ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.7.md))
28
28
 
29
29
  📚 For complete release notes, see the [docs/changelog/](https://github.com/CLDMV/fix-headers/tree/master/docs/changelog/) folder.
30
30
 
@@ -118,6 +118,7 @@ Common CLI options:
118
118
  - `--fix-created-date`
119
119
  - `--strict-created-date`
120
120
  - `--rewrite-declaration-copies [true|false]` / `--no-rewrite-declaration-copies` - set `rewriteDeclarationCopies` (on by default); `--no-rewrite-declaration-copies` skips declarations that carry `tsc`'s copy of their source's header
121
+ - `--tsconfig <path>` - set `tsconfig`
121
122
  - `--strict-header-block [true|false]` / `--no-strict-header-block` - set `strictHeaderBlock` (on by default); `--no-strict-header-block` (or `--strict-header-block false`) keeps text found in a header that is not a header field inside the header, after the fields, instead of moving it to its own block below (see [Text in the header block](#text-in-the-header-block))
122
123
  - `--normalize-date-format`
123
124
  - `--timezone <name>` - write new header dates in an IANA time zone (see [Time zone](#-time-zone))
@@ -161,6 +162,7 @@ Important options:
161
162
  - `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
162
163
  - `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
163
164
  - `rewriteDeclarationCopies?: boolean` - restamp a declaration file that carries `tsc`'s copy of its own source's header for the path and package it ships in, keeping the source's dates and editor (see the skip rules below). On by default. `false` skips those declarations instead, for repos that still commit generated `types/`
165
+ - `tsconfig?: string` - the tsconfig the declarations were built with, relative to `cwd`, used to find the source of a declaration `tsc` emitted without a header (see the skip rules below). Default: `.configs/tsconfig.json`, then `tsconfig.json`; a default that is missing or can't be read is ignored
164
166
  - `strictHeaderBlock?: boolean` - the header block holds only header fields. On by default: text in an existing header that is not a header field (a description, an unknown `@Tag:` line) is moved, verbatim and in order, to its own comment block directly below the header. `false` keeps it inside the header, after the fields. It is never deleted either way. See [Text in the header block](#text-in-the-header-block)
165
167
  - `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`)
166
168
  - `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)
@@ -580,7 +582,8 @@ Every other file is skipped and left byte-for-byte unchanged, including when you
580
582
  - **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.
581
583
  - **A PHP file that does not open with `<?php`** (a template starting with HTML) is skipped: a comment at the top would be output as text. A file where only a fix-headers header (and blank lines) comes before `<?php` is not skipped: an earlier version wrote that header there, and it is moved back below `<?php` (see [What stays above the header](#what-stays-above-the-header)).
582
584
  - **Third-party C and C++** is skipped: a `c` file whose prologue (the comments, blank lines and preprocessor directives before its first line of code) holds a comment with license or copyright wording (`Copyright`, `License`, `SPDX-License-Identifier`, `public domain`) that is not a fix-headers header is left untouched, so a vendored library such as the SQLite amalgamation (`sqlite3.c`, `sqlite3.h`) keeps its own notice. A file whose first comment is already a fix-headers header is never skipped this way. To keep a whole folder of vendored code out of the run regardless of its comments, use `excludeFolders` / `--exclude-folder`.
583
- - **A declaration file `tsc` generated from a source with a header** gets a header of its own. `tsc` copies the source's header into the `.d.ts` / `.d.mts` / `.d.cts` it emits, `@Filename` included, so the declaration an IDE shows would name the source. A declaration whose header names its own source (`types/src/x.d.mts` with `@Filename: src/x.mts`, or `.mjs`; `.d.ts` pairs with `.ts .tsx .js .jsx`, `.d.cts` with `.cts .cjs`) is restamped for the path it ships at: `@Filename: types/src/x.d.mts` and that package's `@Project`, with `@Date`, `@Author`, `@Last modified by` and `@Last modified time` kept from the source's header, since a generated file has no git history of its own. A staged package folder with its own `package.json` is its own project root, so `dist-packages/x-types/lib/x.d.mts` gets `@Filename: lib/x.d.mts`. Run fix-headers after `tsc` where the declarations are built (CI, `prepack`) and keep them out of git: a repo that commits `types/` sees `tsc` and fix-headers rewrite each other's `@Filename` on every build, and should set `rewriteDeclarationCopies: false` (`--no-rewrite-declaration-copies`), which skips these declarations and leaves `tsc`'s copy as it is. A declaration with no header, or one whose header names any other file, is fixed as usual either way.
585
+ - **A declaration file `tsc` generated from a source with a header** gets a header of its own. `tsc` copies the source's header into the `.d.ts` / `.d.mts` / `.d.cts` it emits, `@Filename` included, so the declaration an IDE shows would name the source. A declaration whose header names its own source (`types/src/x.d.mts` with `@Filename: src/x.mts`, or `.mjs`; `.d.ts` pairs with `.ts .tsx .js .jsx`, `.d.cts` with `.cts .cjs`) is restamped for the path it ships at: `@Filename: types/src/x.d.mts` and that package's `@Project`, with `@Date`, `@Author`, `@Last modified by` and `@Last modified time` kept from the source's header, since a generated file has no git history of its own. A staged package folder with its own `package.json` is its own project root, so `dist-packages/x-types/lib/x.d.mts` gets `@Filename: lib/x.d.mts`. Run fix-headers after `tsc` where the declarations are built (CI, `prepack`) and keep them out of git: a repo that commits `types/` sees `tsc` and fix-headers rewrite each other's `@Filename` on every build, and should set `rewriteDeclarationCopies: false` (`--no-rewrite-declaration-copies`), which skips these declarations and leaves `tsc`'s copy as it is. A declaration whose header names any other file is fixed as usual either way.
586
+ - **A declaration `tsc` emitted without a header** takes its source's header instead of being stamped as new. `tsc` drops the source's leading comment when `import` lines follow it, so most declarations arrive with no header. fix-headers finds the source through the tsconfig the declarations were built with (`tsconfig`, following `extends`): the declaration's path inside `declarationDir` (else `outDir`), under `rootDir` (else the tsconfig's folder), with the first matching source extension. `types/src/x.d.mts` built with `rootDir: ".."` and `outDir: "../types"` in `.configs/tsconfig.json` comes from `src/x.mts` or `src/x.mjs`. The header names the declaration (`@Filename: types/src/x.d.mts`) and takes `@Date`, `@Author`, `@Last modified by` and `@Last modified time` from the source's header, so rebuilding the declarations doesn't change them. Without a tsconfig, a source, or a header on the source, or with `rewriteDeclarationCopies: false`, the declaration is stamped like any new file. A declaration whose header names any other file is fixed as usual.
584
587
  - **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.
585
588
 
586
589
  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:
package/dist/cli.mjs CHANGED
@@ -12,6 +12,7 @@ Options:
12
12
  --strict-created-date With --check, fail when @Date is later than git first commit / file creation
13
13
  --rewrite-declaration-copies [true|false] Restamp .d.ts/.d.mts/.d.cts files carrying tsc's copy of their source's header, keeping its dates (default: true)
14
14
  --no-rewrite-declaration-copies Skip those declarations and leave tsc's copied header as it is
15
+ --tsconfig <path> tsconfig the declarations were built with, to find a headerless declaration's source (default: .configs/tsconfig.json, then tsconfig.json)
15
16
  --strict-header-block [true|false] Move non-field text found in a header to its own block below it (default: true)
16
17
  --no-strict-header-block Keep non-field text found in a header inside it, after the fields
17
18
  --normalize-date-format Write every header date in the ISO 8601 T-form (git %aI)
@@ -52,5 +53,5 @@ Examples:
52
53
  fix-headers --check --verbose
53
54
  fix-headers --timezone America/Los_Angeles --convert-timezone
54
55
  fix-headers --project-name @scope/pkg --company-name "Catalyzed Motivation Inc."
55
- `;function C(t){return t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}l(C,"toCamelCase");function j(t){const e={},n={help:!1,json:!1,diff:!1},r={"include-folder":"includeFolders","exclude-folder":"excludeFolders","include-extension":"includeExtensions","enable-detector":"enabledDetectors","disable-detector":"disabledDetectors","force-detector":"forcedDetectors",input:"input"},c={cwd:"cwd","project-name":"projectName",language:"language","project-root":"projectRoot",marker:"marker","author-name":"authorName","author-email":"authorEmail",company:"company","company-name":"companyName","copyright-start-year":"copyrightStartYear",spacing:"spacing",margin:"margin",timezone:"timezone",config:"config"};for(let i=0;i<t.length;i+=1){const o=t[i];if(o==="-h"||o==="--help"){n.help=!0;continue}if(o==="--json"){n.json=!0;continue}if(o==="--diff"){n.diff=!0;continue}if(o==="--verbose"){e.verbose=!0;continue}if(o==="--dry-run"){e.dryRun=!0;continue}if(o==="--check"){e.check=!0;continue}if(o==="--fix-created-date"){e.fixCreatedDate=!0;continue}if(o==="--rewrite-declaration-copies"){const a=t[i+1];(a==="true"||a==="false")&&(i+=1),e.rewriteDeclarationCopies=a!=="false";continue}if(o==="--no-rewrite-declaration-copies"){e.rewriteDeclarationCopies=!1;continue}if(o==="--strict-created-date"){e.strictCreatedDate=!0;continue}if(o==="--strict-header-block"){const a=t[i+1];(a==="true"||a==="false")&&(i+=1),e.strictHeaderBlock=a!=="false";continue}if(o==="--no-strict-header-block"){e.strictHeaderBlock=!1;continue}if(o==="--normalize-date-format"){e.normalizeDateFormat=!0;continue}if(o==="--convert-timezone"){e.convertTimezone=!0;continue}if(o==="--sample-output"){e.sampleOutput=!0;continue}if(o==="--force-author-update"){e.forceAuthorUpdate=!0;continue}if(o==="--force-last-modified-author-update"){e.forceLastModifiedAuthorUpdate=!0;continue}if(o==="--use-gpg-signer-author"){e.useGpgSignerAuthor=!0;continue}if(!o.startsWith("--"))throw new Error(`Unexpected argument: ${o}`);const s=o.slice(2);if(s==="include-folder-non-recursive"){const a=t[i+1];if(!a||a.startsWith("--"))throw new Error(`Missing value for --${s}`);i+=1;const f=Array.isArray(e.includeFolders)?e.includeFolders:[];e.includeFolders=[...f,{path:a,recursive:!1}];continue}if(r[s]){const a=t[i+1];if(!a||a.startsWith("--"))throw new Error(`Missing value for --${s}`);i+=1;const f=r[s],p=Array.isArray(e[f])?e[f]:[];e[f]=Array.from(new Set([...p,a]));continue}if(c[s]){const a=t[i+1];if(!a||a.startsWith("--"))throw new Error(`Missing value for --${s}`);i+=1;const f=c[s];if(f==="copyrightStartYear"||f==="spacing"||f==="margin"){if(e[f]=Number.parseInt(a,10),Number.isNaN(e[f]))throw new Error(`Invalid number for --${s}: ${a}`)}else f==="marker"&&a==="null"?e[f]=null:e[f]=a;continue}const d=C(s),u=t[i+1];if(!u||u.startsWith("--"))throw new Error(`Unknown or malformed flag: --${s}`);i+=1,e[d]=u}return{options:e,help:n.help,json:n.json,diff:n.diff}}l(j,"parseCliArgs");function S(t){return x(t,"config")}l(S,"applyConfigFile");function h(t){if(!t||typeof t!="object")return[];const e=t;return(Array.isArray(e.changes)?e.changes:[]).filter(r=>r&&r.changed===!0&&r.sample&&typeof r.sample.newValue=="string")}l(h,"getSampledChanges");function g(t){return typeof t=="string"?`"${t}"`:"(missing)"}l(g,"formatIssueValue");function D(t,e){for(const n of h(e)){const r=Array.isArray(n.sample.issues)?n.sample.issues:[];if(t(`issues: ${n.file||"<unknown-file>"}`),r.length===0){t(" (no field differences; header formatting only)");continue}for(const c of r)t(` ${c?.field||"<unknown-field>"}: found ${g(c?.previous)}, expected ${g(c?.detected)}`)}}l(D,"printIssues");function O(t,e){for(const n of h(e))typeof n.sample.diff=="string"&&n.sample.diff.length>0&&t(n.sample.diff)}l(O,"printDiffs");function W(t,e){for(const n of h(e))t(`sample: ${n.file||"<unknown-file>"}`),t("previous:"),t(n.sample.previousValue===null?"(none)":String(n.sample.previousValue)),t("new:"),t(n.sample.newValue),n.sample.detectedValues&&typeof n.sample.detectedValues=="object"&&(t("detected-values:"),t(JSON.stringify(n.sample.detectedValues,null,2)))}l(W,"printSampleOutput");function z(t,e){if(!e||typeof e!="object")return;const n=e,c=(Array.isArray(n.changes)?n.changes:[]).filter(i=>i&&i.changed===!0).map(i=>i.file||"<unknown-file>");for(const i of c)t(`updated: ${i}`)}l(z,"printChangedFiles");function y(t,e){const n=Array.isArray(e.copyrightWarnings)?e.copyrightWarnings:[];for(const r of n)t(`warning: ${r?.file||"<unknown-file>"} keeps an additional @Copyright: ${r?.copyright??""}`)}l(y,"printCopyrightWarnings");function E(t,e){const n=Array.isArray(e.skipped)?e.skipped:[];for(const r of n)t(`skipped: ${r?.file||"<unknown-file>"} (${r?.reason||"no reason given"})`)}l(E,"printSkipped");function w(t,e,n,r){const c=n.sampleOutput===!0||r;n.verbose===!0&&(z(t,e),c&&D(t,e)),n.sampleOutput===!0&&W(t,e),r&&O(t,e)}l(w,"printDetails");function I(t,e,n){const r=Array.isArray(e.changes)?e.changes:[];for(const c of r){const i=Array.isArray(c?.dateIssues)?c.dateIssues:[];for(const o of i)o.advisory===!0&&!n||t(`${o.advisory===!0?"advisory":"drift"}: ${c.file||"<unknown-file>"}: ${o.message}`)}}l(I,"printDateIssues");async function N(t,e={}){const n=e.runner||A,r=e.stdout||console.log,c=e.stderr||console.error;try{const i=j(t);if(i.help)return r($),0;const o=await S(i.options),s=await n(i.diff?{...o,sampleOutput:!0}:o),d=s&&typeof s=="object"&&s.check===!0?s:null,u=d&&Number(d.filesWithDateDrift)>0?1:0;if(i.json)return r(JSON.stringify(s,null,2)),u;if(d)return r(`fix-headers check: scanned=${d.filesScanned??0}, drift=${d.filesWithDateDrift??0}, advisories=${d.dateAdvisories??0}`),I(r,d,o.verbose===!0),y(r,s),u;if(s&&typeof s=="object"){const a=s,f=Number(a.filesSkipped)>0?`, skipped=${a.filesSkipped}`:"",p=Array.isArray(a.copyrightWarnings)&&a.copyrightWarnings.length>0?`, warnings=${a.copyrightWarnings.length}`:"";r(`fix-headers complete: scanned=${a.filesScanned??0}, updated=${a.filesUpdated??0}${f}${p}, dryRun=${a.dryRun===!0}`),E(r,a),y(r,a),w(r,s,o,i.diff)}else w(r,s,o,i.diff),r("fix-headers complete");return 0}catch(i){const o=i instanceof Error?i.message:String(i);return c(`fix-headers failed: ${o}`),1}}l(N,"runCli");function U(t=process.argv,e=import.meta.url,n=N){let r=!1;if(t[1])try{const c=m(t[1]),i=m(b(e));r=c===i}catch{r=e===v(t[1]).href}return r?(n(t.slice(2)).then(c=>{process.exitCode=c}),!0):!1}l(U,"runCliAsMain"),U();export{S as applyConfigFile,j as parseCliArgs,N as runCli,U as runCliAsMain};
56
+ `;function j(t){return t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}l(j,"toCamelCase");function C(t){const e={},n={help:!1,json:!1,diff:!1},r={"include-folder":"includeFolders","exclude-folder":"excludeFolders","include-extension":"includeExtensions","enable-detector":"enabledDetectors","disable-detector":"disabledDetectors","force-detector":"forcedDetectors",input:"input"},c={cwd:"cwd","project-name":"projectName",language:"language","project-root":"projectRoot",marker:"marker","author-name":"authorName","author-email":"authorEmail",company:"company","company-name":"companyName","copyright-start-year":"copyrightStartYear",spacing:"spacing",margin:"margin",timezone:"timezone",tsconfig:"tsconfig",config:"config"};for(let i=0;i<t.length;i+=1){const o=t[i];if(o==="-h"||o==="--help"){n.help=!0;continue}if(o==="--json"){n.json=!0;continue}if(o==="--diff"){n.diff=!0;continue}if(o==="--verbose"){e.verbose=!0;continue}if(o==="--dry-run"){e.dryRun=!0;continue}if(o==="--check"){e.check=!0;continue}if(o==="--fix-created-date"){e.fixCreatedDate=!0;continue}if(o==="--rewrite-declaration-copies"){const a=t[i+1];(a==="true"||a==="false")&&(i+=1),e.rewriteDeclarationCopies=a!=="false";continue}if(o==="--no-rewrite-declaration-copies"){e.rewriteDeclarationCopies=!1;continue}if(o==="--strict-created-date"){e.strictCreatedDate=!0;continue}if(o==="--strict-header-block"){const a=t[i+1];(a==="true"||a==="false")&&(i+=1),e.strictHeaderBlock=a!=="false";continue}if(o==="--no-strict-header-block"){e.strictHeaderBlock=!1;continue}if(o==="--normalize-date-format"){e.normalizeDateFormat=!0;continue}if(o==="--convert-timezone"){e.convertTimezone=!0;continue}if(o==="--sample-output"){e.sampleOutput=!0;continue}if(o==="--force-author-update"){e.forceAuthorUpdate=!0;continue}if(o==="--force-last-modified-author-update"){e.forceLastModifiedAuthorUpdate=!0;continue}if(o==="--use-gpg-signer-author"){e.useGpgSignerAuthor=!0;continue}if(!o.startsWith("--"))throw new Error(`Unexpected argument: ${o}`);const s=o.slice(2);if(s==="include-folder-non-recursive"){const a=t[i+1];if(!a||a.startsWith("--"))throw new Error(`Missing value for --${s}`);i+=1;const f=Array.isArray(e.includeFolders)?e.includeFolders:[];e.includeFolders=[...f,{path:a,recursive:!1}];continue}if(r[s]){const a=t[i+1];if(!a||a.startsWith("--"))throw new Error(`Missing value for --${s}`);i+=1;const f=r[s],p=Array.isArray(e[f])?e[f]:[];e[f]=Array.from(new Set([...p,a]));continue}if(c[s]){const a=t[i+1];if(!a||a.startsWith("--"))throw new Error(`Missing value for --${s}`);i+=1;const f=c[s];if(f==="copyrightStartYear"||f==="spacing"||f==="margin"){if(e[f]=Number.parseInt(a,10),Number.isNaN(e[f]))throw new Error(`Invalid number for --${s}: ${a}`)}else f==="marker"&&a==="null"?e[f]=null:e[f]=a;continue}const d=j(s),u=t[i+1];if(!u||u.startsWith("--"))throw new Error(`Unknown or malformed flag: --${s}`);i+=1,e[d]=u}return{options:e,help:n.help,json:n.json,diff:n.diff}}l(C,"parseCliArgs");function S(t){return x(t,"config")}l(S,"applyConfigFile");function h(t){if(!t||typeof t!="object")return[];const e=t;return(Array.isArray(e.changes)?e.changes:[]).filter(r=>r&&r.changed===!0&&r.sample&&typeof r.sample.newValue=="string")}l(h,"getSampledChanges");function g(t){return typeof t=="string"?`"${t}"`:"(missing)"}l(g,"formatIssueValue");function D(t,e){for(const n of h(e)){const r=Array.isArray(n.sample.issues)?n.sample.issues:[];if(t(`issues: ${n.file||"<unknown-file>"}`),r.length===0){t(" (no field differences; header formatting only)");continue}for(const c of r)t(` ${c?.field||"<unknown-field>"}: found ${g(c?.previous)}, expected ${g(c?.detected)}`)}}l(D,"printIssues");function O(t,e){for(const n of h(e))typeof n.sample.diff=="string"&&n.sample.diff.length>0&&t(n.sample.diff)}l(O,"printDiffs");function W(t,e){for(const n of h(e))t(`sample: ${n.file||"<unknown-file>"}`),t("previous:"),t(n.sample.previousValue===null?"(none)":String(n.sample.previousValue)),t("new:"),t(n.sample.newValue),n.sample.detectedValues&&typeof n.sample.detectedValues=="object"&&(t("detected-values:"),t(JSON.stringify(n.sample.detectedValues,null,2)))}l(W,"printSampleOutput");function z(t,e){if(!e||typeof e!="object")return;const n=e,c=(Array.isArray(n.changes)?n.changes:[]).filter(i=>i&&i.changed===!0).map(i=>i.file||"<unknown-file>");for(const i of c)t(`updated: ${i}`)}l(z,"printChangedFiles");function y(t,e){const n=Array.isArray(e.copyrightWarnings)?e.copyrightWarnings:[];for(const r of n)t(`warning: ${r?.file||"<unknown-file>"} keeps an additional @Copyright: ${r?.copyright??""}`)}l(y,"printCopyrightWarnings");function E(t,e){const n=Array.isArray(e.skipped)?e.skipped:[];for(const r of n)t(`skipped: ${r?.file||"<unknown-file>"} (${r?.reason||"no reason given"})`)}l(E,"printSkipped");function w(t,e,n,r){const c=n.sampleOutput===!0||r;n.verbose===!0&&(z(t,e),c&&D(t,e)),n.sampleOutput===!0&&W(t,e),r&&O(t,e)}l(w,"printDetails");function I(t,e,n){const r=Array.isArray(e.changes)?e.changes:[];for(const c of r){const i=Array.isArray(c?.dateIssues)?c.dateIssues:[];for(const o of i)o.advisory===!0&&!n||t(`${o.advisory===!0?"advisory":"drift"}: ${c.file||"<unknown-file>"}: ${o.message}`)}}l(I,"printDateIssues");async function N(t,e={}){const n=e.runner||A,r=e.stdout||console.log,c=e.stderr||console.error;try{const i=C(t);if(i.help)return r($),0;const o=await S(i.options),s=await n(i.diff?{...o,sampleOutput:!0}:o),d=s&&typeof s=="object"&&s.check===!0?s:null,u=d&&Number(d.filesWithDateDrift)>0?1:0;if(i.json)return r(JSON.stringify(s,null,2)),u;if(d)return r(`fix-headers check: scanned=${d.filesScanned??0}, drift=${d.filesWithDateDrift??0}, advisories=${d.dateAdvisories??0}`),I(r,d,o.verbose===!0),y(r,s),u;if(s&&typeof s=="object"){const a=s,f=Number(a.filesSkipped)>0?`, skipped=${a.filesSkipped}`:"",p=Array.isArray(a.copyrightWarnings)&&a.copyrightWarnings.length>0?`, warnings=${a.copyrightWarnings.length}`:"";r(`fix-headers complete: scanned=${a.filesScanned??0}, updated=${a.filesUpdated??0}${f}${p}, dryRun=${a.dryRun===!0}`),E(r,a),y(r,a),w(r,s,o,i.diff)}else w(r,s,o,i.diff),r("fix-headers complete");return 0}catch(i){const o=i instanceof Error?i.message:String(i);return c(`fix-headers failed: ${o}`),1}}l(N,"runCli");function U(t=process.argv,e=import.meta.url,n=N){let r=!1;if(t[1])try{const c=m(t[1]),i=m(b(e));r=c===i}catch{r=e===v(t[1]).href}return r?(n(t.slice(2)).then(c=>{process.exitCode=c}),!0):!1}l(U,"runCliAsMain"),U();export{S as applyConfigFile,C as parseCliArgs,N as runCli,U as runCliAsMain};
56
57
  //# sourceMappingURL=cli.mjs.map
@@ -0,0 +1,4 @@
1
+ var p=Object.defineProperty;var l=(n,t)=>p(n,"name",{value:t,configurable:!0});import{readFile as w,stat as y}from"node:fs/promises";import{createRequire as h}from"node:module";import{basename as x,dirname as a,isAbsolute as m,join as g,relative as j,resolve as u,sep as E}from"node:path";const S=/^(.+)\.d\.(ts|mts|cts)$/i,$={ts:[".ts",".tsx",".js",".jsx"],mts:[".mts",".mjs"],cts:[".cts",".cjs"]},A=[".configs/tsconfig.json","tsconfig.json"];function L(n){let t="",i=!1;for(let o=0;o<n.length;o+=1){const r=n[o],e=n[o+1];if(i){t+=r,r==="\\"?(t+=e??"",o+=1):r==='"'&&(i=!1);continue}if(r==='"')i=!0,t+=r;else if(r==="/"&&e==="/"){for(;o<n.length&&n[o]!==`
2
+ `;)o+=1;t+=`
3
+ `}else if(r==="/"&&e==="*"){const s=n.indexOf("*/",o+2);o=s===-1?n.length:s+1}else if(r==="}"||r==="]"){const s=t.trimEnd();t=(s.endsWith(",")?s.slice(0,-1):t)+r}else t+=r}return JSON.parse(t)}l(L,"parseJsonc");function O(n,t){if(n.startsWith(".")||m(n)){const i=u(a(t),n);return i.endsWith(".json")?i:`${i}.json`}return h(t).resolve(n)}l(O,"resolveExtends");async function f(n,t=new Set){if(t.has(n))throw new Error(`tsconfig extends itself: ${n}`);t.add(n);const i=L(await w(n,"utf8"));let o={rootDir:null,outDir:null,declarationDir:null,configDir:a(n)};const r=i.extends===void 0?[]:Array.isArray(i.extends)?i.extends:[i.extends];for(const s of r){const c=await f(O(s,n),t);o={rootDir:c.rootDir??o.rootDir,outDir:c.outDir??o.outDir,declarationDir:c.declarationDir??o.declarationDir,configDir:o.configDir}}const e=i.compilerOptions??{};for(const s of["rootDir","outDir","declarationDir"])typeof e[s]=="string"&&(o[s]=u(a(n),e[s]));return o}l(f,"readDeclarationLayout");async function d(n){const t=await y(n).catch(()=>null);return t!==null&&t.isFile()}l(d,"isFile");async function F(n,t){const i=S.exec(x(n)),o=t.declarationDir??t.outDir;if(!i||o===null)return null;const r=j(o,n);if(r===".."||r.startsWith(`..${E}`)||m(r))return null;const[,e,s]=i,c=g(t.rootDir??t.configDir,a(r),e);for(const D of $[s.toLowerCase()])if(await d(`${c}${D}`))return`${c}${D}`;return null}l(F,"findDeclarationSource");function R({scanRoot:n,tsconfig:t=null}){let i=null;const o=l(async()=>{if(typeof t=="string"&&t.length>0){const r=u(n,t);if(!await d(r))throw new Error(`tsconfig not found: ${t}`);return f(r)}for(const r of A){const e=u(n,r);if(await d(e))return f(e).catch(()=>null)}return null},"loadLayout");return async r=>{i??=o();const e=await i;return e===null?null:F(r,e)}}l(R,"createDeclarationSourceResolver");export{R as createDeclarationSourceResolver,F as findDeclarationSource,L as parseJsonc,f as readDeclarationLayout};
4
+ //# sourceMappingURL=declaration-sources.mjs.map
@@ -1,3 +1,3 @@
1
- var He=Object.defineProperty;var s=(a,e)=>He(a,"name",{value:e,configurable:!0});import{readFile as je,stat as ke,writeFile as Ie}from"node:fs/promises";import{relative as j,resolve as pe}from"node:path";import{applyConfigOption as Oe}from"../config/load.mjs";import{DEFAULT_HEADER_MARGIN as Pe,DEFAULT_HEADER_SPACING as ze,resolveLayoutCount as he}from"../constants.mjs";import{discoverFiles as ge}from"./file-discovery.mjs";import{getContentSkipReason as $e,getHeaderSkipReason as Ue,resolveForcedDetectors as Be}from"../detectors/index.mjs";import{declarationCopySkipReason as Te,isDeclarationFile as Ye}from"../detectors/node.mjs";import{resolveProjectMetadata as ye}from"../detect/project.mjs";import{checkHeaderDates as Ge,convertDatePayload as Ze,dateYear as _e,normalizeDatePayload as Ve,repairDateEpoch as De,resolveCreatedDate as We}from"../header/dates.mjs";import{buildHeader as qe}from"../header/template.mjs";import{compareHeaderFields as Je}from"../header/fields.mjs";import{extractHeaderlessBody as Ne,findProjectHeader as Ke,replaceOrInsertHeader as we,restoreTopLines as Qe}from"../header/parser.mjs";import{createUnifiedDiff as Xe}from"../utils/diff.mjs";import{readFileDates as et}from"../utils/fs.mjs";import{getGitCreationDate as tt,getGitLastModifiedDate as ot,readGitHeadFile as at}from"../utils/git.mjs";import{assertTimeZone as rt,toDatePayload as k}from"../utils/time.mjs";function nt(a){return Oe(a,"configFile")}s(nt,"resolveRuntimeOptions");function it(a){if(a==null)return[];const e=Array.isArray(a)?a:[a];if(e.some(r=>typeof r!="string"))throw new Error(`input must be a path or an array of paths, got ${JSON.stringify(a)}`);return e.filter(r=>r.trim().length>0)}s(it,"resolveInputs");function st(a){const e=a.match(/@Author:\s*(.+)$/m),r=a.match(/@Email:\s*<([^>\n]+)>/m);return{authorName:e?.[1]?.trim(),authorEmail:r?.[1]?.trim()}}s(st,"extractHeaderAuthorIdentity");function ct(a){const e=a.match(/@Last modified by:\s*(.+?)\s*\(([^)\n]+)\)\s*$/m);return{authorName:e?.[1]?.trim(),authorEmail:e?.[2]?.trim()}}s(ct,"extractHeaderLastModifiedIdentity");function dt(a){const e=a.match(/@Date:\s*(.+?)\s*\((\d+)\)$/m);if(!e||!e[1]||!e[2])return null;const r=Number.parseInt(e[2],10);return Number.isNaN(r)?null:{date:e[1].trim(),timestamp:r}}s(dt,"extractHeaderCreatedAt");function lt(a){const e=a.match(/@Last modified time:\s*(.+?)\s*\((\d+)\)$/m);if(!e||!e[1]||!e[2])return null;const r=Number.parseInt(e[2],10);return Number.isNaN(r)?null:{date:e[1].trim(),timestamp:r}}s(lt,"extractHeaderLastModifiedAt");async function mt(a,e,r){const m=await at(e);return m.state!=="tracked"?{edited:m.state==="untracked",state:m.state}:{edited:Ne(m.content,e,r)!==Ne(a,e,r),state:"tracked"}}s(mt,"detectContentEdit");async function Ft(a={}){const e=await nt(a),r=e.timezone===void 0||e.timezone===null?null:rt(e.timezone),m=e.convertTimezone===!0;if(m&&!r)throw new Error("convertTimezone requires timezone: set timezone (CLI --timezone <name>) to the IANA zone to convert header dates into");const g=Be(e.forcedDetectors),u=pe(e.projectRoot||e.cwd||process.cwd()),I=await ye({...e,cwd:u});he(e.spacing,"spacing",ze),he(e.margin,"margin",Pe);const x=e.check===!0,O=x||e.dryRun===!0,xe=e.fixCreatedDate===!0,P=e.rewriteDeclarationCopies!==!1,v=s(o=>o,"keepDate"),b=e.normalizeDateFormat===!0?Ve:v,A=r?o=>Ze(o,r):v,z=m?A:v,$={language:I.language,enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:g,includeFolders:e.includeFolders,excludeFolders:e.excludeFolders,includeExtensions:e.includeExtensions,gitignore:e.gitignore},U=it(e.input);let C;if(U.length>0){const o=new Set;for(const f of U){const l=pe(u,f),c=await ke(l).catch(()=>null);if(!c)throw new Error(`Input path does not exist: ${f}`);if(c.isFile())o.add(l);else if(c.isDirectory())for(const E of await ge({...$,projectRoot:l}))o.add(E);else throw new Error(`Input path must be a file or directory: ${f}`)}C=Array.from(o)}else C=await ge({...$,projectRoot:u});const Ae=new Date().getFullYear(),B=[],y=[],T=new Set;let Y=0,G=0,Z=0;const _=[];for(const o of C){const f=Ue(o,{enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:g});if(f!==null){y.push({file:j(u,o),reason:f});continue}const l=j(u,o),c=await je(o,"utf8"),E={enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:g,detectorSyntaxOverrides:e.detectorSyntaxOverrides},V=Qe(c,o,E),M=P&&Te(V,o)!==null,W=M?null:$e(o,V,E);if(W!==null){y.push({file:l,reason:W});continue}const t=await ye({...e,cwd:u,targetFilePath:o});T.add(`${t.language}:${t.projectRoot}`);const D={language:t.language,enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:g,detectorSyntaxOverrides:e.detectorSyntaxOverrides,spacing:e.spacing,margin:e.margin,strictHeaderBlock:e.strictHeaderBlock!==!1},R=Ke(c,o,D),n=R?c.slice(R.start,R.end):"",q=n.length>0?st(n):{},J=n.length>0?ct(n):{},Ce=n.length>0?dt(n):null,Ee=n.length>0?lt(n):null,K=await et(o),Q=j(t.projectRoot,o),X=await tt(t.projectRoot,Q),N=await ot(t.projectRoot,Q),ee=k(K.createdAt),F=We({existing:De(Ce),gitCreated:X,filesystemCreated:ee,fixCreatedDate:xe}),p=De(Ee),te=F.source,Se=p?"existing-header":N?"git-last-modified":"filesystem-updated",L=b(te==="existing-header"?z(F.payload):A(F.payload)),ve=t.copyrightStartYear===null?"created-date":"option",oe=t.copyrightStartYear??_e(L,r),ae=b(p?z(p):A(N||k(K.updatedAt))),re=e.forceAuthorUpdate===!0,be=e.forceLastModifiedAuthorUpdate===!0,ne=M?null:await mt(c,o,D),ie=M||P&&ne?.state==="untracked"&&n.length>0&&Ye(o),se=ie?{edited:!1,state:"no-git"}:ne,ce=be||se.edited,de=s(i=>qe({absoluteFilePath:o,language:t.language,syntaxOptions:D,projectRoot:t.projectRoot,projectName:t.projectName,createdByName:re?t.authorName:q.authorName||t.authorName,createdByEmail:re?t.authorEmail:q.authorEmail||t.authorEmail,lastModifiedByName:ce?t.authorName:J.authorName||t.authorName,lastModifiedByEmail:ce?t.authorEmail:J.authorEmail||t.authorEmail,authorName:t.authorName,authorEmail:t.authorEmail,createdAt:L,lastModifiedAt:i,copyrightStartYear:oe,companyName:t.companyName,currentYear:Ae}),"renderHeader"),le=de(ae),me=we(c,le,o,D),Me=se.edited&&p!==null&&N!==null&&p.timestamp<N.timestamp,ue=me.changed||Me,H=ue&&!(ie&&p!==null),fe=H?b(A(k(new Date))):ae,Re=H?"current-time-on-change":Se,Fe=H?de(fe):le,d=ue?we(c,Fe,o,D):me,S={file:l,changed:d.changed};if(x){const i=Ge(n,{gitCreated:X,gitLastModified:N,filesystemCreated:ee},{strictCreatedDate:e.strictCreatedDate===!0}),w=i.filter(h=>h.advisory).length;S.dateIssues=i,Z+=w,G+=i.length>w?1:0}if(e.sampleOutput===!0&&d.changed){const i=n.length>0?n.trimEnd():null,w=l.replace(/\\/g,"/"),h=d.written,Le=d.nextContent.slice(0,d.nextContent.indexOf(h)).split(`
2
- `).length-1;S.sample={previousValue:i,newValue:h,diff:Xe(i,h,{fromFile:`a/${w}`,toFile:`b/${w}`,lineOffset:Le}),issues:Je(i,h),detectedValues:{projectName:t.projectName,projectNameSource:t.projectNameSource,language:t.language,projectRoot:t.projectRoot,marker:t.marker,authorName:t.authorName,authorEmail:t.authorEmail,companyName:t.companyName,companyNameSource:t.companyNameSource,copyrightStartYear:oe,copyrightStartYearSource:ve,createdAtSource:te,lastModifiedAtSource:Re,createdAt:L,lastModifiedAt:fe}}}if(d.extraCopyrights.length>0){S.extraCopyrights=d.extraCopyrights;for(const i of d.extraCopyrights)_.push({file:l,copyright:i})}B.push(S),d.changed&&(Y+=1,O||await Ie(o,d.nextContent,"utf8"))}return{metadata:I,detectedProjects:Array.from(T),filesScanned:C.length-y.length,filesUpdated:Y,filesSkipped:y.length,dryRun:O,check:x,...x?{filesWithDateDrift:G,dateAdvisories:Z}:{},copyrightWarnings:_,changes:B,skipped:y}}s(Ft,"fixHeaders");export{Ft as fixHeaders};
1
+ var $e=Object.defineProperty;var n=(o,e)=>$e(o,"name",{value:e,configurable:!0});import{readFile as ye,stat as Ue,writeFile as Te}from"node:fs/promises";import{relative as I,resolve as De}from"node:path";import{applyConfigOption as Be}from"../config/load.mjs";import{DEFAULT_HEADER_MARGIN as Ye,DEFAULT_HEADER_SPACING as Ge,resolveLayoutCount as we}from"../constants.mjs";import{discoverFiles as Ne}from"./file-discovery.mjs";import{getContentSkipReason as Ze,getHeaderSkipReason as _e,resolveForcedDetectors as Ve}from"../detectors/index.mjs";import{declarationCopySkipReason as We,isDeclarationFile as xe}from"../detectors/node.mjs";import{createDeclarationSourceResolver as qe}from"./declaration-sources.mjs";import{resolveProjectMetadata as Ae}from"../detect/project.mjs";import{checkHeaderDates as Je,convertDatePayload as Ke,dateYear as Qe,normalizeDatePayload as Xe,repairDateEpoch as Ce,resolveCreatedDate as et}from"../header/dates.mjs";import{buildHeader as tt}from"../header/template.mjs";import{compareHeaderFields as ot}from"../header/fields.mjs";import{extractHeaderlessBody as Ee,findProjectHeader as Se,replaceOrInsertHeader as ve,restoreTopLines as at}from"../header/parser.mjs";import{createUnifiedDiff as rt}from"../utils/diff.mjs";import{readFileDates as nt}from"../utils/fs.mjs";import{getGitCreationDate as it,getGitLastModifiedDate as st,readGitHeadFile as ct}from"../utils/git.mjs";import{assertTimeZone as dt,toDatePayload as O}from"../utils/time.mjs";function lt(o){return Be(o,"configFile")}n(lt,"resolveRuntimeOptions");function mt(o){if(o==null)return[];const e=Array.isArray(o)?o:[o];if(e.some(r=>typeof r!="string"))throw new Error(`input must be a path or an array of paths, got ${JSON.stringify(o)}`);return e.filter(r=>r.trim().length>0)}n(mt,"resolveInputs");function ut(o){const e=o.match(/@Author:\s*(.+)$/m),r=o.match(/@Email:\s*<([^>\n]+)>/m);return{authorName:e?.[1]?.trim(),authorEmail:r?.[1]?.trim()}}n(ut,"extractHeaderAuthorIdentity");function ft(o){const e=o.match(/@Last modified by:\s*(.+?)\s*\(([^)\n]+)\)\s*$/m);return{authorName:e?.[1]?.trim(),authorEmail:e?.[2]?.trim()}}n(ft,"extractHeaderLastModifiedIdentity");function pt(o){const e=o.match(/@Date:\s*(.+?)\s*\((\d+)\)$/m);if(!e||!e[1]||!e[2])return null;const r=Number.parseInt(e[2],10);return Number.isNaN(r)?null:{date:e[1].trim(),timestamp:r}}n(pt,"extractHeaderCreatedAt");function ht(o){const e=o.match(/@Last modified time:\s*(.+?)\s*\((\d+)\)$/m);if(!e||!e[1]||!e[2])return null;const r=Number.parseInt(e[2],10);return Number.isNaN(r)?null:{date:e[1].trim(),timestamp:r}}n(ht,"extractHeaderLastModifiedAt");async function gt(o,e){if(o===null)return"";const r=await ye(o,"utf8"),i=Se(r,o,e);return i?r.slice(i.start,i.end):""}n(gt,"readSourceHeader");async function yt(o,e,r){const i=await ct(e);return i.state!=="tracked"?{edited:i.state==="untracked",state:i.state}:{edited:Ee(i.content,e,r)!==Ee(o,e,r),state:"tracked"}}n(yt,"detectContentEdit");async function zt(o={}){const e=await lt(o),r=e.timezone===void 0||e.timezone===null?null:dt(e.timezone),i=e.convertTimezone===!0;if(i&&!r)throw new Error("convertTimezone requires timezone: set timezone (CLI --timezone <name>) to the IANA zone to convert header dates into");const D=Ve(e.forcedDetectors),u=De(e.projectRoot||e.cwd||process.cwd()),z=await Ae({...e,cwd:u});we(e.spacing,"spacing",Ge),we(e.margin,"margin",Ye);const A=e.check===!0,P=A||e.dryRun===!0,Re=e.fixCreatedDate===!0,R=e.rewriteDeclarationCopies!==!1,b=n(a=>a,"keepDate"),M=e.normalizeDateFormat===!0?Xe:b,C=r?a=>Ke(a,r):b,$=i?C:b,U={language:z.language,enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:D,includeFolders:e.includeFolders,excludeFolders:e.excludeFolders,includeExtensions:e.includeExtensions,gitignore:e.gitignore},T=mt(e.input),be=qe({scanRoot:u,tsconfig:e.tsconfig});let E;if(T.length>0){const a=new Set;for(const f of T){const l=De(u,f),c=await Ue(l).catch(()=>null);if(!c)throw new Error(`Input path does not exist: ${f}`);if(c.isFile())a.add(l);else if(c.isDirectory())for(const S of await Ne({...U,projectRoot:l}))a.add(S);else throw new Error(`Input path must be a file or directory: ${f}`)}E=Array.from(a)}else E=await Ne({...U,projectRoot:u});const Me=new Date().getFullYear(),B=[],w=[],Y=new Set;let G=0,Z=0,_=0;const V=[];for(const a of E){const f=_e(a,{enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:D});if(f!==null){w.push({file:I(u,a),reason:f});continue}const l=I(u,a),c=await ye(a,"utf8"),S={enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:D,detectorSyntaxOverrides:e.detectorSyntaxOverrides},W=at(c,a,S),H=R&&We(W,a)!==null,q=H?null:Ze(a,W,S);if(q!==null){w.push({file:l,reason:q});continue}const t=await Ae({...e,cwd:u,targetFilePath:a});Y.add(`${t.language}:${t.projectRoot}`);const p={language:t.language,enabledDetectors:e.enabledDetectors,disabledDetectors:e.disabledDetectors,forcedDetectors:D,detectorSyntaxOverrides:e.detectorSyntaxOverrides,spacing:e.spacing,margin:e.margin,strictHeaderBlock:e.strictHeaderBlock!==!1},F=Se(c,a,p),h=F?c.slice(F.start,F.end):"",J=R&&h.length===0&&xe(a)?await gt(await be(a),p):"",m=h||J,K=m.length>0?ut(m):{},Q=m.length>0?ft(m):{},He=m.length>0?pt(m):null,Fe=m.length>0?ht(m):null,X=await nt(a),ee=I(t.projectRoot,a),te=await it(t.projectRoot,ee),N=await st(t.projectRoot,ee),oe=O(X.createdAt),L=et({existing:Ce(He),gitCreated:te,filesystemCreated:oe,fixCreatedDate:Re}),g=Ce(Fe),ae=L.source,Le=g?"existing-header":N?"git-last-modified":"filesystem-updated",j=M(ae==="existing-header"?$(L.payload):C(L.payload)),je=t.copyrightStartYear===null?"created-date":"option",re=t.copyrightStartYear??Qe(j,r),ne=M(g?$(g):C(N||O(X.updatedAt))),ie=e.forceAuthorUpdate===!0,ke=e.forceLastModifiedAuthorUpdate===!0,se=J.length>0,ce=H||se?null:await yt(c,a,p),de=H||se||R&&ce?.state==="untracked"&&h.length>0&&xe(a),le=de?{edited:!1,state:"no-git"}:ce,me=ke||le.edited,ue=n(s=>tt({absoluteFilePath:a,language:t.language,syntaxOptions:p,projectRoot:t.projectRoot,projectName:t.projectName,createdByName:ie?t.authorName:K.authorName||t.authorName,createdByEmail:ie?t.authorEmail:K.authorEmail||t.authorEmail,lastModifiedByName:me?t.authorName:Q.authorName||t.authorName,lastModifiedByEmail:me?t.authorEmail:Q.authorEmail||t.authorEmail,authorName:t.authorName,authorEmail:t.authorEmail,createdAt:j,lastModifiedAt:s,copyrightStartYear:re,companyName:t.companyName,currentYear:Me}),"renderHeader"),fe=ue(ne),pe=ve(c,fe,a,p),Ie=le.edited&&g!==null&&N!==null&&g.timestamp<N.timestamp,he=pe.changed||Ie,k=he&&!(de&&g!==null),ge=k?M(C(O(new Date))):ne,Oe=k?"current-time-on-change":Le,ze=k?ue(ge):fe,d=he?ve(c,ze,a,p):pe,v={file:l,changed:d.changed};if(A){const s=Je(h,{gitCreated:te,gitLastModified:N,filesystemCreated:oe},{strictCreatedDate:e.strictCreatedDate===!0}),x=s.filter(y=>y.advisory).length;v.dateIssues=s,_+=x,Z+=s.length>x?1:0}if(e.sampleOutput===!0&&d.changed){const s=h.length>0?h.trimEnd():null,x=l.replace(/\\/g,"/"),y=d.written,Pe=d.nextContent.slice(0,d.nextContent.indexOf(y)).split(`
2
+ `).length-1;v.sample={previousValue:s,newValue:y,diff:rt(s,y,{fromFile:`a/${x}`,toFile:`b/${x}`,lineOffset:Pe}),issues:ot(s,y),detectedValues:{projectName:t.projectName,projectNameSource:t.projectNameSource,language:t.language,projectRoot:t.projectRoot,marker:t.marker,authorName:t.authorName,authorEmail:t.authorEmail,companyName:t.companyName,companyNameSource:t.companyNameSource,copyrightStartYear:re,copyrightStartYearSource:je,createdAtSource:ae,lastModifiedAtSource:Oe,createdAt:j,lastModifiedAt:ge}}}if(d.extraCopyrights.length>0){v.extraCopyrights=d.extraCopyrights;for(const s of d.extraCopyrights)V.push({file:l,copyright:s})}B.push(v),d.changed&&(G+=1,P||await Te(a,d.nextContent,"utf8"))}return{metadata:z,detectedProjects:Array.from(Y),filesScanned:E.length-w.length,filesUpdated:G,filesSkipped:w.length,dryRun:P,check:A,...A?{filesWithDateDrift:Z,dateAdvisories:_}:{},copyrightWarnings:V,changes:B,skipped:w}}n(zt,"fixHeaders");export{zt as fixHeaders};
3
3
  //# sourceMappingURL=fix-headers.mjs.map
package/dist/index.cjs CHANGED
@@ -7,28 +7,20 @@
7
7
  * @Email: <Shinrai@users.noreply.github.com>
8
8
  * -----
9
9
  * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
- * @Last modified time: 2026-11-25T19:44:18-08:00 (1795664658)
10
+ * @Last modified time: 2026-11-27T12:16:43-08:00 (1795810603)
11
11
  * -----
12
12
  * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
13
  *
14
14
  */
15
15
 
16
16
  /**
17
- * @fileoverview CommonJS entry point — a thin, synchronous wrapper around the ESM build.
17
+ * @fileoverview CommonJS entry point: the generic CLDMV drop-in shim
18
+ * (CLDMV/.github docs/conventions/package-layout.md).
18
19
  *
19
- * Node's `require()` loads an ES module synchronously and returns its namespace, as
20
- * long as that module has no top-level await (dist/index.mjs has none). The wrapper
21
- * returns the default export, keeping the historical `module.exports = fixHeaders`
22
- * shape, instead of a second full copy of the library built for CJS.
23
- *
24
- * Node.js versions without require(esm) (20.x before 20.19, 22.x before 22.12, and
25
- * anything older) would fail with a bare ERR_REQUIRE_ESM, so the check below fails
26
- * early with a message that says what to do instead.
27
- *
28
- * It sits next to the ESM entry under the same name, so `require("./index.mjs")` resolves
29
- * to src/index.mjs from source and to dist/index.mjs once built. scripts/build.mjs copies
30
- * it verbatim into dist/; it never passes through esbuild, so it stays
31
- * this small however much the library grows.
20
+ * It returns what `import` gives: the single distinct exported value when there is one
21
+ * (here `fixHeaders`, which is also the default export), so `require("@cldmv/fix-headers")`
22
+ * is the function itself; otherwise the module object. scripts/build.mjs copies it
23
+ * verbatim into dist/, where `./index.mjs` resolves to the built entry.
32
24
  * @module fix-headers/cjs-entry
33
25
  */
34
26
  "use strict";
@@ -41,4 +33,12 @@ if (!process.features?.require_module) {
41
33
  throw error;
42
34
  }
43
35
 
44
- module.exports = require("./index.mjs").default;
36
+ // Same exports as `import`. One distinct exported value (aliases of it count once) comes back as that value,
37
+ // so require(x)(...) works; anything else comes back as the module object ({ default, ...named }).
38
+ const esm = require("./index.mjs");
39
+ const values = new Set(
40
+ Object.keys(esm)
41
+ .filter((key) => key !== "__esModule")
42
+ .map((key) => esm[key])
43
+ );
44
+ module.exports = values.size === 1 ? values.values().next().value : esm;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@cldmv/fix-headers",
3
- "version": "2.5.1",
3
+ "version": "2.6.1",
4
4
  "description": "Multi-language project header normalizer with auto-detection and override support.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
8
- "types": "./types/index.d.mts",
8
+ "types": "./types/src/index.d.mts",
9
9
  "files": [
10
10
  "dist/",
11
11
  "!dist/**/*.map",
@@ -14,11 +14,11 @@
14
14
  "exports": {
15
15
  ".": {
16
16
  "fix-headers-dev": {
17
- "types": "./types/index.d.mts",
17
+ "types": "./types/src/index.d.mts",
18
18
  "import": "./src/index.mjs",
19
19
  "require": "./src/index.cjs"
20
20
  },
21
- "types": "./types/index.d.mts",
21
+ "types": "./types/src/index.d.mts",
22
22
  "import": "./dist/index.mjs",
23
23
  "require": "./dist/index.cjs"
24
24
  },
@@ -35,11 +35,11 @@
35
35
  "test:watch": "vitest --config .configs/vitest.config.mjs",
36
36
  "coverage": "node tests/run-vitest.mjs --coverage-quiet && npm run test:cjs",
37
37
  "ci:coverage": "npm run coverage && npm run test:dist",
38
- "types:build": "tsc -p .configs/tsconfig.json --noCheck",
38
+ "types:build": "tsc -p .configs/tsconfig.json --noCheck && node --conditions=fix-headers-dev ./src/cli.mjs --config .configs/fix-headers.json --input types",
39
39
  "types:check": "tsc -p .configs/tsconfig.json --noEmit",
40
40
  "cli": "node --conditions=fix-headers-dev ./src/cli.mjs",
41
41
  "build": "node scripts/build.mjs",
42
- "prepack": "node -e \"const fs=require('node:fs');if(fs.existsSync('node_modules/esbuild')){require('node:child_process').execSync('npm run build',{stdio:'inherit'})}else if(!fs.existsSync('dist/index.mjs')){throw new Error('dist/ is missing and esbuild is unavailable to build it')}\"",
42
+ "prepack": "node -e \"const fs=require('node:fs');if(fs.existsSync('node_modules/esbuild')){require('node:child_process').execSync('npm run types:build && npm run build',{stdio:'inherit'})}else if(!fs.existsSync('dist/index.mjs')){throw new Error('dist/ is missing and esbuild is unavailable to build it')}\"",
43
43
  "lint": "eslint --config .configs/eslint.config.mjs .",
44
44
  "lint:fix": "eslint --config .configs/eslint.config.mjs . --fix",
45
45
  "format": "prettier --config .configs/.prettierrc --write .",
@@ -93,11 +93,11 @@
93
93
  "license": "Apache-2.0",
94
94
  "sideEffects": false,
95
95
  "devDependencies": {
96
- "@cldmv/configs": "^1.4.0",
96
+ "@cldmv/configs": "^1.5.0",
97
97
  "@cldmv/eslint-plugin-jsonv": "^1.0.10",
98
98
  "@cldmv/jsonv": "^1.0.9",
99
99
  "@cldmv/prettier-plugin-jsonv": "^1.0.6",
100
- "@cldmv/vitest-runner": "^1.4.2",
100
+ "@cldmv/vitest-runner": "^1.11.3",
101
101
  "@eslint/css": "^2.0.0",
102
102
  "@eslint/js": "^10.0.1",
103
103
  "@eslint/json": "^2.1.0",
@@ -1,4 +1,19 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ *
4
+ * @Project: @cldmv/fix-headers
5
+ * @Filename: types/src/cli.d.mts
6
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
7
+ * @Author: Nate Corcoran <CLDMV>
8
+ * @Email: <Shinrai@users.noreply.github.com>
9
+ * -----
10
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
11
+ * @Last modified time: 2026-11-27T12:50:52-08:00 (1795812652)
12
+ * -----
13
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
14
+ *
15
+ */
16
+
2
17
  /**
3
18
  * Parses CLI arguments into fixHeaders options and control flags.
4
19
  * @param {string[]} argv - Process argument vector without node/script items.
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/config/load.d.mts
5
+ * @Date: 2026-09-28T21:19:05-07:00 (1790655545)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Merges `override` onto `base`: plain objects merge key by key, arrays and scalars replace.
3
18
  * Neither input is modified. `__proto__` keys are skipped so a config can't change prototypes.
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/constants.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Reads a layout count option (`spacing` / `margin`): unset means the default, anything but a whole number of 0 or more throws.
3
18
  * @param {unknown} value - Option value.
@@ -0,0 +1,58 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/core/declaration-sources.d.mts
5
+ * @Date: 2026-11-27T12:44:03-08:00 (1795812243)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-27T12:44:52-08:00 (1795812292)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
16
+ /**
17
+ * @typedef {{ rootDir: string | null, outDir: string | null, declarationDir: string | null, configDir: string }} DeclarationLayout
18
+ */
19
+ /**
20
+ * Parses tsconfig JSON, which allows comments and trailing commas.
21
+ * @param {string} text - File content.
22
+ * @returns {any} Parsed value.
23
+ */
24
+ export function parseJsonc(text: string): any;
25
+ /**
26
+ * Reads a tsconfig and the configs it extends, resolving each directory option against the
27
+ * folder of the config that sets it (a later config overrides an earlier one, as in `tsc`).
28
+ * @param {string} configPath - Absolute tsconfig path.
29
+ * @param {Set<string>} [seen] - Configs already read (guards against `extends` cycles).
30
+ * @returns {Promise<DeclarationLayout>} The directory options that matter for declarations.
31
+ */
32
+ export function readDeclarationLayout(configPath: string, seen?: Set<string>): Promise<DeclarationLayout>;
33
+ /**
34
+ * Finds the source a declaration was emitted from under a layout: the declaration's path inside
35
+ * `declarationDir` (else `outDir`), taken under `rootDir` (else the tsconfig's folder), with the
36
+ * first source extension that exists.
37
+ * @param {string} declarationPath - Absolute declaration path.
38
+ * @param {DeclarationLayout} layout - Tsconfig directory options.
39
+ * @returns {Promise<string | null>} Absolute source path, or null when none is found.
40
+ */
41
+ export function findDeclarationSource(declarationPath: string, layout: DeclarationLayout): Promise<string | null>;
42
+ /**
43
+ * Creates a lookup from a declaration to its source for one run. The tsconfig is the `tsconfig`
44
+ * option (relative to the scan root), else the first of `.configs/tsconfig.json` and
45
+ * `tsconfig.json` that exists; with none, every lookup returns null.
46
+ * @param {{ scanRoot: string, tsconfig?: string | null }} options - Scan root and optional tsconfig path.
47
+ * @returns {(declarationPath: string) => Promise<string | null>} Source lookup.
48
+ */
49
+ export function createDeclarationSourceResolver({ scanRoot, tsconfig }: {
50
+ scanRoot: string;
51
+ tsconfig?: string | null;
52
+ }): (declarationPath: string) => Promise<string | null>;
53
+ export type DeclarationLayout = {
54
+ rootDir: string | null;
55
+ outDir: string | null;
56
+ declarationDir: string | null;
57
+ configDir: string;
58
+ };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/core/file-discovery.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Discovers source files for processing.
3
18
  * @param {{
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/core/fix-headers.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-27T12:50:52-08:00 (1795812652)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * @fileoverview Main header-fixing engine with auto-detection and override support.
3
18
  * @module fix-headers/core/fix-headers
@@ -16,6 +31,7 @@ export type FixHeadersOptions = {
16
31
  fixCreatedDate?: boolean;
17
32
  strictCreatedDate?: boolean;
18
33
  rewriteDeclarationCopies?: boolean;
34
+ tsconfig?: string;
19
35
  strictHeaderBlock?: boolean;
20
36
  normalizeDateFormat?: boolean;
21
37
  timezone?: string;
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/core/ignore-rules.d.mts
5
+ * @Date: 2026-09-28T18:00:27-07:00 (1790643627)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Creates the ignore filter for one discovery root.
3
18
  * @param {{ root: string, gitignore?: boolean | string | string[] }} options - `gitignore`: `false`
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detect/project.d.mts
5
+ * @Date: 2026-03-01T13:32:57-08:00 (1772400777)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Detects the project a path belongs to from the manifests of the project it sits in (see
3
18
  * {@link resolveManifestProject}), independent of the file's type.
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/c.d.mts
5
+ * @Date: 2026-11-25T08:41:13-08:00 (1795624873)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/css.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/go.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/html.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:23-08:00 (1795640843)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/index.d.mts
5
+ * @Date: 2026-03-01T16:34:41-08:00 (1772411681)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:24-08:00 (1795640844)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Validates the `forcedDetectors` option: each id must name a force-only detector
3
18
  * (`requiresForce: true`). Forcing a detector that is used without forcing, or one that does
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/json.d.mts
5
+ * @Date: 2026-03-01T20:00:00-08:00 (1772424000)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:24-08:00 (1795640844)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/markdown.d.mts
5
+ * @Date: 2026-10-03T17:04:18-07:00 (1791072258)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:24-08:00 (1795640844)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/node.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:49:52-08:00 (1795643392)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Whether a path names a TypeScript declaration file (`.d.ts`, `.d.mts` or `.d.cts`).
3
18
  * @param {string} filePath - File path.
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/php.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:24-08:00 (1795640844)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/python.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:24-08:00 (1795640844)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/rust.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:24-08:00 (1795640844)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/top-lines.d.mts
5
+ * @Date: 2026-10-31T12:00:00-07:00 (1793473200)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:25-08:00 (1795640845)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Whether a comment line is a vi/Vim/ex modeline, in either of Vim's forms:
3
18
  * `vim: set ts=4 sw=4:` (`se`/`set`, options, a closing `:`, then any text) or
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/detectors/yaml.d.mts
5
+ * @Date: 2026-03-01T18:28:31-08:00 (1772418511)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:25-08:00 (1795640845)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  export namespace detector {
2
17
  export let id: string;
3
18
  export { extensions };
@@ -1,2 +1,17 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/go.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:25-08:00 (1795640845)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /** @type {import("./index.mjs").ManifestDriver} */
2
17
  export const driver: import("./index.mjs").ManifestDriver;
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/index.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:25-08:00 (1795640845)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Gets a driver by id.
3
18
  * @param {string} id - Driver id.
@@ -1,2 +1,17 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/node.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:25-08:00 (1795640845)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /** @type {import("./index.mjs").ManifestDriver} */
2
17
  export const driver: import("./index.mjs").ManifestDriver;
@@ -1,2 +1,17 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/php.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:25-08:00 (1795640845)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /** @type {import("./index.mjs").ManifestDriver} */
2
17
  export const driver: import("./index.mjs").ManifestDriver;
@@ -1,2 +1,17 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/python.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /** @type {import("./index.mjs").ManifestDriver} */
2
17
  export const driver: import("./index.mjs").ManifestDriver;
@@ -1,2 +1,17 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/rust.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /** @type {import("./index.mjs").ManifestDriver} */
2
17
  export const driver: import("./index.mjs").ManifestDriver;
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/drivers/shared.d.mts
5
+ * @Date: 2026-09-28T19:20:00-07:00 (1790648400)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Detects a driver's manifests in one folder. The folder counts as a project of the driver's
3
18
  * kind when at least one of the manifests is present and readable; its content is not
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/header/dates.d.mts
5
+ * @Date: 2026-09-28T09:16:17-07:00 (1790612177)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Picks the earliest of several labelled date payloads. Missing payloads are skipped and the
3
18
  * earlier entry wins a tie, so callers list their preferred source first.
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/header/fields.d.mts
5
+ * @Date: 2026-09-28T09:14:18-07:00 (1790612058)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Parses every known field out of a header block. Values are the text as written in
3
18
  * the header (dates keep their `date (timestamp)` form); a field that is missing or
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/header/parser.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * Splits the text of an existing header block that is not header fields from the fields.
3
18
  * `foreign` holds every line that is neither a field, a separator next to a field, nor an
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/header/syntax.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * @fileoverview Header comment syntax helpers for mapping file extensions to comment styles.
3
18
  * @module fix-headers/header/syntax
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/header/template.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * @fileoverview Header template builder used to generate normalized file headers.
3
18
  * @module fix-headers/header/template
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/index.d.mts
5
+ * @Date: 2026-03-01T13:34:00-08:00 (1772400840)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * @fileoverview Public module API exposing a single function for header updates.
3
18
  * @module fix-headers
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  * @Project: @cldmv/fix-headers
4
- * @Filename: src/utils/diff.mjs
4
+ * @Filename: types/src/utils/diff.d.mts
5
5
  * @Date: 2026-09-28T09:14:18-07:00 (1790612058)
6
6
  * @Author: Nate Corcoran <CLDMV>
7
7
  * @Email: <Shinrai@users.noreply.github.com>
@@ -12,6 +12,7 @@
12
12
  * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
13
  *
14
14
  */
15
+
15
16
  /**
16
17
  * @fileoverview Minimal line-level unified diff for header blocks. Header blocks are a
17
18
  * handful of lines, so a plain longest-common-subsequence table is fast enough and keeps
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/utils/fs.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * @fileoverview Filesystem helpers for project discovery and recursive scanning.
3
18
  * @module fix-headers/utils/fs
@@ -1,3 +1,18 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/fix-headers
4
+ * @Filename: types/src/utils/git.d.mts
5
+ * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-11-25T13:07:26-08:00 (1795640846)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+
1
16
  /**
2
17
  * @fileoverview Git helpers for author identity and file history metadata.
3
18
  * @module fix-headers/utils/git
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  * @Project: @cldmv/fix-headers
4
- * @Filename: src/utils/text.mjs
4
+ * @Filename: types/src/utils/text.d.mts
5
5
  * @Date: 2026-10-31T16:30:00-07:00 (1793489400)
6
6
  * @Author: Nate Corcoran <CLDMV>
7
7
  * @Email: <Shinrai@users.noreply.github.com>
@@ -12,6 +12,7 @@
12
12
  * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
13
  *
14
14
  */
15
+
15
16
  /**
16
17
  * @fileoverview String checks written as index scans instead of regular expressions, so they
17
18
  * run in linear time on any input (the regex forms backtrack polynomially on long runs of
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  * @Project: @cldmv/fix-headers
4
- * @Filename: src/utils/time.mjs
4
+ * @Filename: types/src/utils/time.d.mts
5
5
  * @Date: 2026-03-01T17:59:32-08:00 (1772416772)
6
6
  * @Author: Nate Corcoran <CLDMV>
7
7
  * @Email: <Shinrai@users.noreply.github.com>
@@ -12,6 +12,7 @@
12
12
  * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
13
  *
14
14
  */
15
+
15
16
  /**
16
17
  * @fileoverview Date/time helpers used for header timestamp formatting.
17
18
  * @module fix-headers/utils/time
@@ -1 +0,0 @@
1
- export {};
package/types/index.d.mts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./src/index.mjs";
2
- export { default } from "./src/index.mjs";