#65

Replace `haveType` with filesystem path-kind terminology

Openfelixarntzopened 3mo ago

haveType uses “type” for the file-versus-directory distinction, overloading the TypeScript type vocabulary used throughout the predicate model. This should be resolved first because it blocks a coherent path-versus-file terminology cleanup.

Relevant files:

  • packages/konsistent/src/config/schema.ts
  • packages/konsistent/src/predicates/have-type.ts
  • packages/konsistent/src/core/runner.ts
  • packages/konsistent/konsistent.schema.json
  • docs/reference/predicates.md

Rename the concept and predicate to havePathKind with file and directory as its values, and consistently call the distinction “path kind” in code, schema, diagnostics, and documentation.

Backward compatibility: internal names and documentation can be renamed or removed without compatibility shims. Because this changes the konsistent.json schema, keep haveType working with its existing behavior, mark it deprecated, and emit a non-failing CLI warning whenever it is used.

Activity

1
felixarntz3mo ago

Blocks #66.