vercel-labs / vercel-labs/konsistent

Replace `haveType` with filesystem path-kind terminology

Open
#65 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
176
Forks
6
Avg merge
20h 26m
Merged PRs (30d)
11

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the predicate and configuration definitions in packages/konsistent/src/predicates/have-type.ts and packages/konsistent/src/config/schema.ts, then inspect packages/konsistent/src/core/runner.ts, konsistent.schema.json, and docs/reference/predicates.md. Done means havePathKind uses file and directory with path-kind terminology, while existing haveType behavior remains available as deprecated and produces a non-failing CLI warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, documentation, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.