Skip to content

T-9XXD-intersect-package-exports-and-docs

Status: closed/done · Impact: medium · Complexity: small

Finalize Intersect for extraction — a package.json with exports for ././segments/./fs, a README, a zero-runtime-dep core entry, and a fully-green corpus (no pending remaining) — so the directory can be lifted into its own repo.

The implemented package (core, path, registry, fs) and its corpus exist from the prior tasks.

LocationRole today
plugin/lib/intersect/index.tsThe implemented path-API entry.
plugin/lib/intersect/segments/index.tsThe implemented core entry.
plugin/lib/intersect/fs.tsThe implemented fs entry.
plugin/lib/intersect/fixtures/The corpus, now mostly active.

plugin/lib/intersect/package.json defines name, an exports map (. → path API, ./segments → core, ./fs → fs), sideEffects: false, and a files allowlist; a README documents the three entry points with examples from D-4FRD-intersect-api; no fixture remains pending; the core/segments entries declare no runtime dependencies.

  1. Add plugin/lib/intersect/package.json with the exports map and metadata; keep the globber reachable only from ./fs.
  2. Write plugin/lib/intersect/README.md — the three entry points, the exact-match/subtree rule, and a short example lifted from D-4FRD-intersect-api examples.md.
  3. Sweep the corpus: assert no pending: true remains; the harness runs every case as an active test.
  4. Add a test that the ././segments entries resolve with zero runtime deps and ./fs is the only entry that pulls the globber.
  5. Typecheck and run the full suite.
LocationKindChange
plugin/lib/intersect/package.jsonnewPackage manifest with subpath exports.
plugin/lib/intersect/README.mdnewEntry points + usage.
plugin/lib/intersect/tests/exports.test.tsnewAssert entries resolve and the core is dep-free.
plugin/lib/intersect/fixtures/*.cases.jsonmodifyRemove residual pending flags.
  • AC-1: plugin/lib/intersect/package.json exposes ., ./segments, and ./fs via exports.
  • AC-2: No *.cases.json case carries pending: true; bun test plugin/lib/intersect is fully green with every case active.
  • AC-3: A test asserts importing intersect / intersect/segments pulls no runtime dependency; only intersect/fs pulls the globber.
  • AC-4: README.md documents all three entry points; bunx tsc --noEmit passes.
  • Publishing to npm and the actual repo extraction (a follow-up once the corpus is green).
  • intersection(a,b) and pattern-level negation — deferred per D-4FRD-intersect-api.
  • Requires the implemented core, path API, registry, and fs layer: T-UY5H, T-IRYT, T-C4Q0, T-ZAZO.
  • Closes the milestone: turns the implemented layers into an extractable package.

T-UY5H, T-IRYT, T-C4Q0, T-ZAZO


← Back to Tasks