@cldmv/fix-headers 2.2.5 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/index.cjs +5 -5
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -14,18 +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.2.
|
|
17
|
+
### Latest: v2.2.7 (November 2026)
|
|
18
18
|
|
|
19
|
-
- **
|
|
20
|
-
-
|
|
21
|
-
- [View full v2.2.5 Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.5.md)
|
|
19
|
+
- **Tests run against `src/` and `dist/`** — no library code changed. The test suite now gets the `fix-headers-dev` condition through `devCondition()` from `@cldmv/configs` (the old `test.nodeOptions` never reached the workers), the tests import the package by name, and `npm run test:dist` builds the package and runs the same suite against `dist/` ([#179](https://github.com/CLDMV/fix-headers/pull/179), [#181](https://github.com/CLDMV/fix-headers/pull/181)). Also a discovery-test fix for checkouts under a `dist` folder, `vitest` 5.1.0 and the `sync-release-notes` workflow ([#182](https://github.com/CLDMV/fix-headers/pull/182), [#183](https://github.com/CLDMV/fix-headers/pull/183), [#187](https://github.com/CLDMV/fix-headers/pull/187)).
|
|
20
|
+
- [View full v2.2.7 Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.7.md)
|
|
22
21
|
|
|
23
22
|
### Recent Releases
|
|
24
23
|
|
|
24
|
+
- **v2.2.6** (November 2026) — `engines.node` is back to `>=18.0.0`, the runtime floor; the 22.22.0 development toolchain floor moves to `devEngines`, and the `require()` error names ^20.19.0 or >=22.13.0 ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.6.md))
|
|
25
|
+
- **v2.2.5** (November 2026) — the source-checkout development check is removed (the `fix-headers-dev` condition already picks `src/` or `dist/`), and `engines.node` went to `>=22.22.0` ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.5.md))
|
|
25
26
|
- **v2.2.4** (October 2026) — one header per file: stacked headers merge, repeated fields and stale `@Copyright` lines are dropped, only position-critical lines stay above the header, `#` headers are found in CRLF and byte-order-mark files ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.4.md))
|
|
26
27
|
- **v2.2.3** (October 2026) — text inside an existing header that is not a header field is kept instead of deleted, moved to its own block below the header by default (`strictHeaderBlock`), plus a dependency refresh ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.3.md))
|
|
27
|
-
- **v2.2.2** (October 2026) — dependency refresh with nothing the package ships changed: `ignore` 7.0.12 within its range, plus `@cldmv/vitest-runner` 1.5.3, `vitest` 5.0.3, `eslint` 10.12.0 and `globals` 17.13.0 ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.2.md))
|
|
28
|
-
- **v2.2.1** (October 2026) — development-setup patch: the repository's own `fix:headers` run moves to `@cldmv/configs` 1.2.4, whose shared config no longer forces author updates; nothing the package ships changed ([Changelog](https://github.com/CLDMV/fix-headers/blob/master/docs/changelog/v2/v2.2.1.md))
|
|
29
28
|
|
|
30
29
|
📚 For complete release notes, see the [docs/changelog/](https://github.com/CLDMV/fix-headers/tree/master/docs/changelog/) folder.
|
|
31
30
|
|
|
@@ -51,8 +50,9 @@ Headers stay correct without hand-editing: `@Date` follows the file's real creat
|
|
|
51
50
|
|
|
52
51
|
### Requirements
|
|
53
52
|
|
|
54
|
-
- **Node.js
|
|
55
|
-
-
|
|
53
|
+
- **Node.js 18.0.0 or later** (`engines.node` is `>=18.0.0`). The package is an ES module and loads with `import` on every supported version. Remote (`https://`) config `extends` uses the global `fetch`, which Node.js 18 has.
|
|
54
|
+
- `require("@cldmv/fix-headers")` loads the ES module build synchronously, which needs Node.js ^20.19.0 or >=22.13.0; on older Node.js, use `import()` instead.
|
|
55
|
+
- Developing this package needs Node.js 22.22.0 or later (`devEngines`). `npm test` runs the suite against `src/`, and `npm run test:dist` builds the package and runs it against `dist/`.
|
|
56
56
|
|
|
57
57
|
### Install
|
|
58
58
|
|
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
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-
|
|
10
|
+
* @Last modified time: 2026-11-01T16:29:20-08:00 (1793579360)
|
|
11
11
|
* -----
|
|
12
12
|
* @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
|
|
13
13
|
*
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
* returns the default export, keeping the historical `module.exports = fixHeaders`
|
|
22
22
|
* shape, instead of tsup bundling a second full copy of the library for CJS.
|
|
23
23
|
*
|
|
24
|
-
* Node.js versions without require(esm) (before 22.
|
|
25
|
-
*
|
|
26
|
-
* instead.
|
|
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
27
|
*
|
|
28
28
|
* It sits next to the ESM entry under the same name, so `require("./index.mjs")` resolves
|
|
29
29
|
* to src/index.mjs from source and to dist/index.mjs once built. tsup's `onSuccess` copies
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
if (!process.features?.require_module) {
|
|
37
37
|
const error = new Error(
|
|
38
|
-
`@cldmv/fix-headers: require() needs Node.js >=22.
|
|
38
|
+
`@cldmv/fix-headers: require() needs Node.js ^20.19.0 or >=22.13.0 (this is ${process.version}). On older Node.js, load the package with import() instead.`
|
|
39
39
|
);
|
|
40
40
|
error.code = "ERR_REQUIRE_ESM";
|
|
41
41
|
throw error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cldmv/fix-headers",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"description": "Multi-language project header normalizer with auto-detection and override support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build:ci": "npm run lint --if-present && npm run format:check --if-present && npm run types:check && npm run types:build && npm run build",
|
|
34
|
-
"test": "node tests/run-vitest.mjs && npm run test:cjs",
|
|
34
|
+
"test": "node tests/run-vitest.mjs && npm run test:cjs && npm run test:dist",
|
|
35
35
|
"test:cjs": "npm run build && node --conditions=fix-headers-dev --test tests/cjs/entry.test.cjs",
|
|
36
|
+
"test:dist": "npm run build && node tests/run-vitest.mjs --mode=dist",
|
|
36
37
|
"test:watch": "vitest --config .configs/vitest.config.mjs",
|
|
37
38
|
"coverage": "node tests/run-vitest.mjs --coverage-quiet && npm run test:cjs",
|
|
38
|
-
"ci:coverage": "npm run coverage",
|
|
39
|
+
"ci:coverage": "npm run coverage && npm run test:dist",
|
|
39
40
|
"types:build": "tsc -p .configs/tsconfig.json --noCheck",
|
|
40
41
|
"types:check": "tsc -p .configs/tsconfig.json --noEmit",
|
|
41
42
|
"cli": "node --conditions=fix-headers-dev ./src/cli.mjs",
|
|
@@ -63,7 +64,14 @@
|
|
|
63
64
|
},
|
|
64
65
|
"homepage": "https://github.com/CLDMV/fix-headers#readme",
|
|
65
66
|
"engines": {
|
|
66
|
-
"node": ">=
|
|
67
|
+
"node": ">=18.0.0"
|
|
68
|
+
},
|
|
69
|
+
"devEngines": {
|
|
70
|
+
"runtime": {
|
|
71
|
+
"name": "node",
|
|
72
|
+
"version": ">=22.22.0",
|
|
73
|
+
"onFail": "error"
|
|
74
|
+
}
|
|
67
75
|
},
|
|
68
76
|
"author": {
|
|
69
77
|
"name": "Shinrai",
|
|
@@ -87,7 +95,7 @@
|
|
|
87
95
|
"license": "Apache-2.0",
|
|
88
96
|
"sideEffects": false,
|
|
89
97
|
"devDependencies": {
|
|
90
|
-
"@cldmv/configs": "^1.
|
|
98
|
+
"@cldmv/configs": "^1.4.0",
|
|
91
99
|
"@cldmv/eslint-plugin-jsonv": "^1.0.10",
|
|
92
100
|
"@cldmv/jsonv": "^1.0.9",
|
|
93
101
|
"@cldmv/prettier-plugin-jsonv": "^1.0.6",
|