dotmd-cli 0.76.4 → 0.76.5

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/validate.mjs +5 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotmd-cli",
3
- "version": "0.76.4",
3
+ "version": "0.76.5",
4
4
  "description": "CLI for managing markdown documents with YAML frontmatter — index, query, validate, graph, export, lifecycle, and AI summaries.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/validate.mjs CHANGED
@@ -262,17 +262,15 @@ export function validateDoc(doc, frontmatter, headingTitle, config) {
262
262
  const skipRefValidation = config.lifecycle.isTerminal?.(doc.status, doc.type)
263
263
  ?? config.lifecycle.terminalStatuses.has(doc.status);
264
264
  if (!skipRefValidation) {
265
- const compatibilityWarning = config.lifecycle.skipsWarnings(doc.status, doc.type);
266
265
  for (const field of allRefFields) {
267
266
  for (const relPath of (doc.refFields[field] || [])) {
268
267
  if (!resolveRefPath(relPath, docDir, config.repoRoot)) {
269
- const issue = {
268
+ doc.errors.push({
270
269
  path: doc.path,
271
- level: compatibilityWarning ? 'warning' : 'error',
270
+ level: 'error',
272
271
  message: `${field} entry \`${relPath}\` does not resolve to an existing file.`,
273
- meta: { kind: compatibilityWarning ? 'ref-resolution-compat' : 'ref-resolution', field, relPath },
274
- };
275
- (compatibilityWarning ? doc.warnings : doc.errors).push(issue);
272
+ meta: { kind: 'ref-resolution', field, relPath },
273
+ });
276
274
  }
277
275
  }
278
276
  }
@@ -328,7 +326,7 @@ function candidatePathsForType(docs, type) {
328
326
  // name implies one (e.g. `related_plans` → plans only).
329
327
  export function enrichRefErrorSuggestions(docs, config) {
330
328
  const enrich = (entry) => {
331
- if (!entry?.meta || !['ref-resolution', 'ref-resolution-compat'].includes(entry.meta.kind)) return;
329
+ if (!entry?.meta || entry.meta.kind !== 'ref-resolution') return;
332
330
  if (entry._suggested) return;
333
331
  const inferred = inferRefFieldType(entry.meta.field);
334
332
  const candidates = candidatePathsForType(docs, inferred);