doc-freshness-checker 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/config/defaults.js +9 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/types.d.ts +22 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -294,6 +294,20 @@ export default defineConfig({
|
|
|
294
294
|
});
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
+
The following accepted configuration options do not affect validation or reporting and are planned for removal in v3.0.0.
|
|
298
|
+
They remain part of the incremental configuration fingerprint, so changing one forces the next incremental run to perform
|
|
299
|
+
a full validation:
|
|
300
|
+
|
|
301
|
+
| Option | Current behavior / migration |
|
|
302
|
+
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
303
|
+
| `rules.version.allowMinorDrift` | Version validation compares major versions only. |
|
|
304
|
+
| `outputDir` | Use `outputPath` with the JSON, Markdown, or Enhanced reporter. Console output remains on stdout. |
|
|
305
|
+
| `ignorePatterns` | `include` and `exclude` select documentation files. Rule-level `illustrativePatterns` can suppress illustrative `file-path`, `directory-structure`, and `code-snippet` references; there is no general semantic reference-ignore replacement. |
|
|
306
|
+
| `git`, `git.enabled`, `git.trackChanges`, `git.changeWindow` | Git availability is auto-detected during graph processing, and Enhanced reports use a fixed seven-day change window. |
|
|
307
|
+
| `vectorSearch.indexCodeComments`, `vectorSearch.indexDocstrings` | Enabled vector search follows its built-in indexing behavior. |
|
|
308
|
+
|
|
309
|
+
The exported `GitConfig` type is deprecated with the `git` property.
|
|
310
|
+
|
|
297
311
|
<details>
|
|
298
312
|
<summary>Full configuration example</summary>
|
|
299
313
|
|
package/dist/config/defaults.js
CHANGED
|
@@ -58,6 +58,7 @@ export const DEFAULT_CONFIG = {
|
|
|
58
58
|
version: {
|
|
59
59
|
enabled: true,
|
|
60
60
|
severity: 'warning',
|
|
61
|
+
// Deprecated: ignored by validation; changing this value invalidates incremental reuse.
|
|
61
62
|
allowMinorDrift: true,
|
|
62
63
|
},
|
|
63
64
|
'directory-structure': {
|
|
@@ -90,8 +91,10 @@ export const DEFAULT_CONFIG = {
|
|
|
90
91
|
// Reporter configuration
|
|
91
92
|
reporters: ['console'],
|
|
92
93
|
// Output directory for reports
|
|
94
|
+
// Deprecated: ignored by reporting; changing this value invalidates incremental reuse.
|
|
93
95
|
outputDir: '.doc-freshness-reports',
|
|
94
96
|
// Ignore patterns (regex strings)
|
|
97
|
+
// Deprecated: ignored by reference filtering; changing this value invalidates incremental reuse.
|
|
95
98
|
ignorePatterns: [],
|
|
96
99
|
// Custom extractors (advanced)
|
|
97
100
|
customExtractors: [],
|
|
@@ -104,10 +107,11 @@ export const DEFAULT_CONFIG = {
|
|
|
104
107
|
cacheMaxAge: 24 * 60 * 60 * 1000, // 24 hours for non-git repos
|
|
105
108
|
},
|
|
106
109
|
// Git integration settings
|
|
110
|
+
// Deprecated: ignored by Git behavior; changing these values invalidates incremental reuse.
|
|
107
111
|
git: {
|
|
108
|
-
enabled: true,
|
|
109
|
-
trackChanges: true,
|
|
110
|
-
changeWindow: 7,
|
|
112
|
+
enabled: true,
|
|
113
|
+
trackChanges: true,
|
|
114
|
+
changeWindow: 7,
|
|
111
115
|
},
|
|
112
116
|
// Freshness scoring settings
|
|
113
117
|
freshnessScoring: {
|
|
@@ -129,7 +133,9 @@ export const DEFAULT_CONFIG = {
|
|
|
129
133
|
vectorSearch: {
|
|
130
134
|
enabled: false, // Disabled by default
|
|
131
135
|
similarityThreshold: 0.3, // Lower = stricter matching
|
|
136
|
+
// Deprecated: ignored by vector indexing; changing this value invalidates incremental reuse.
|
|
132
137
|
indexCodeComments: true,
|
|
138
|
+
// Deprecated: ignored by vector indexing; changing this value invalidates incremental reuse.
|
|
133
139
|
indexDocstrings: true,
|
|
134
140
|
},
|
|
135
141
|
// Cache settings
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW;IACX,cAAc;IACd,SAAS;IACT,qBAAqB;IACrB,cAAc;IACd,cAAc;IACd,YAAY;CACJ,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;IAEtB,+BAA+B;IAC/B,OAAO,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC;IAEtC,mBAAmB;IACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,CAAC;IAE5E,yDAAyD;IACzD,iCAAiC;IACjC,aAAa,EAAE,IAAI;IAEnB,mDAAmD;IACnD,iCAAiC;IACjC,cAAc,EAAE,IAAI;IAEpB,0BAA0B;IAC1B,aAAa,EAAE;QACb,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,CAAC;QACtD,YAAY,EAAE,IAAI;KACnB;IAED,iCAAiC;IACjC,KAAK,EAAE;QACL,WAAW,EAAE;YACX,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,OAAO;YACjB,sEAAsE;YACtE,oBAAoB,EAAE;gBACpB,oEAAoE;gBACpE,wEAAwE;gBACxE,+BAA+B;gBAC/B,6CAA6C;gBAC7C,0DAA0D;gBAC1D,SAAS;gBACT,aAAa;gBACb,gDAAgD;gBAChD,8BAA8B;gBAC9B,YAAY,EAAE,wBAAwB;aACvC;YACD,gBAAgB,EAAE,IAAI;SACvB;QACD,cAAc,EAAE;YACd,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,SAAS;SACpB;QACD,OAAO,EAAE;YACP,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,SAAS;YACnB,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ACjB,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,sBAAsB;QAC3B,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;KAC5B;IAED,kDAAkD;IAClD,WAAW,EAAE;QACX,OAAO,EAAE,KAAK;KACf;IAED,kBAAkB;IAClB,OAAO,EAAE,KAAK;CACf,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface CodeSnippetRuleConfig extends RuleConfig {
|
|
|
38
38
|
skipIllustrative?: boolean;
|
|
39
39
|
}
|
|
40
40
|
export interface VersionRuleConfig extends RuleConfig {
|
|
41
|
+
/** @deprecated No validation effect; changes invalidate incremental reuse. Major versions are compared. Planned removal in v3.0.0. */
|
|
41
42
|
allowMinorDrift?: boolean;
|
|
42
43
|
}
|
|
43
44
|
export interface RulesConfig {
|
|
@@ -62,9 +63,16 @@ export interface GraphConfig {
|
|
|
62
63
|
cacheDir?: string;
|
|
63
64
|
cacheMaxAge?: number;
|
|
64
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Its fields have no Git effect; changes invalidate incremental reuse. Git is auto-detected,
|
|
68
|
+
* and Enhanced reports use a seven-day window. Planned removal in v3.0.0.
|
|
69
|
+
*/
|
|
65
70
|
export interface GitConfig {
|
|
71
|
+
/** @deprecated No Git effect; changes invalidate incremental reuse. Git is auto-detected. Planned removal in v3.0.0. */
|
|
66
72
|
enabled?: boolean;
|
|
73
|
+
/** @deprecated No Git effect; changes invalidate incremental reuse. Tracking is fixed. Planned removal in v3.0.0. */
|
|
67
74
|
trackChanges?: boolean;
|
|
75
|
+
/** @deprecated No Git effect; changes invalidate incremental reuse. Enhanced uses seven days. Planned removal in v3.0.0. */
|
|
68
76
|
changeWindow?: number;
|
|
69
77
|
}
|
|
70
78
|
export interface FreshnessScoringWeights {
|
|
@@ -87,7 +95,9 @@ export interface FreshnessScoringConfig {
|
|
|
87
95
|
export interface VectorSearchConfig {
|
|
88
96
|
enabled?: boolean;
|
|
89
97
|
similarityThreshold?: number;
|
|
98
|
+
/** @deprecated No indexing effect; changes invalidate incremental reuse. Comments are always indexed. Planned removal in v3.0.0. */
|
|
90
99
|
indexCodeComments?: boolean;
|
|
100
|
+
/** @deprecated No indexing effect; changes invalidate incremental reuse. No docstring path exists. Planned removal in v3.0.0. */
|
|
91
101
|
indexDocstrings?: boolean;
|
|
92
102
|
}
|
|
93
103
|
export interface CacheConfig {
|
|
@@ -108,12 +118,24 @@ export interface DocFreshnessConfig {
|
|
|
108
118
|
urlValidation?: UrlValidationConfig;
|
|
109
119
|
rules?: RulesConfig;
|
|
110
120
|
reporters?: ReporterType[];
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated No report-routing effect; changes invalidate incremental reuse. Use outputPath for
|
|
123
|
+
* JSON, Markdown, or Enhanced. Console remains on stdout. Planned removal in v3.0.0.
|
|
124
|
+
*/
|
|
111
125
|
outputDir?: string;
|
|
112
126
|
outputPath?: string;
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated No filtering effect; changes invalidate incremental reuse. Rule-level
|
|
129
|
+
* illustrativePatterns cover file-path, directory-structure, and code-snippet only. Planned removal in v3.0.0.
|
|
130
|
+
*/
|
|
113
131
|
ignorePatterns?: string[];
|
|
114
132
|
customExtractors?: Extractor[];
|
|
115
133
|
customValidators?: Record<string, BaseValidator>;
|
|
116
134
|
graph?: GraphConfig;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated No Git effect; changes invalidate incremental reuse. Git is auto-detected, and
|
|
137
|
+
* Enhanced reports use a seven-day window. Planned removal in v3.0.0.
|
|
138
|
+
*/
|
|
117
139
|
git?: GitConfig;
|
|
118
140
|
freshnessScoring?: FreshnessScoringConfig;
|
|
119
141
|
vectorSearch?: VectorSearchConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-freshness-checker",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Universal documentation freshness checker - validates documentation accuracy against actual codebase",
|
|
5
5
|
"homepage": "https://github.com/cosmocoder/doc-freshness-checker#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@commitlint/cli": "20.5.3",
|
|
79
79
|
"@commitlint/config-conventional": "20.5.3",
|
|
80
80
|
"@eslint/js": "9.39.2",
|
|
81
|
-
"@types/node": "24.13.
|
|
81
|
+
"@types/node": "24.13.4",
|
|
82
82
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
83
83
|
"@semantic-release/github": "12.0.9",
|
|
84
84
|
"@semantic-release/npm": "13.1.5",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"prettier": "3.9.6",
|
|
94
94
|
"prettier-plugin-brace-style": "0.10.3",
|
|
95
95
|
"typescript": "5.9.3",
|
|
96
|
-
"typescript-eslint": "8.
|
|
96
|
+
"typescript-eslint": "8.70.0",
|
|
97
97
|
"vitest": "4.1.11"
|
|
98
98
|
},
|
|
99
99
|
"publishConfig": {
|