feat(editor): scaffold editor package
UI-only feature package for the ADR-029 editor rebuild: tsconfig rootDir '.', vitest jsdom base with '@' alias and honest L0 baseline thresholds, conformance ESLint active, React 19, @xyflow/react + zustand wired against the pre-approved 2026-07-12 library traces. Minimal feature.manifest.ts (empty useCases — no binders; declares requiredCores runner-protocol + baseline coverage band) so the editor participates in pnpm conformance without weakening any lint rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
40
packages/editor/src/feature.manifest.test.ts
Normal file
40
packages/editor/src/feature.manifest.test.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import {
|
||||
DEFAULT_COVERAGE_BANDS,
|
||||
getCoverageBands,
|
||||
} from "@repo/core-shared/conformance";
|
||||
import { editorManifest } from "@/feature.manifest";
|
||||
|
||||
describe("editorManifest", () => {
|
||||
it("declares the editor feature name", () => {
|
||||
expect(editorManifest.name).toBe("editor");
|
||||
});
|
||||
|
||||
it("declares no use cases — the editor is a UI-only feature (ADR-029)", () => {
|
||||
expect(editorManifest.useCases).toEqual({});
|
||||
});
|
||||
|
||||
it("requires the runner-protocol core (render-frame schema source)", () => {
|
||||
expect(editorManifest.requiredCores).toEqual(["runner-protocol"]);
|
||||
});
|
||||
|
||||
it("declares no realtime channels and no jobs", () => {
|
||||
expect(editorManifest.realtimeChannels).toEqual([]);
|
||||
expect(editorManifest.jobs).toEqual([]);
|
||||
});
|
||||
|
||||
it("declares the default baseline coverage band — drift guard against vitest.config.ts, which inherits the same numbers from nodeVitestConfig", () => {
|
||||
expect(editorManifest.coverage.bands.baseline).toEqual(
|
||||
DEFAULT_COVERAGE_BANDS.baseline,
|
||||
);
|
||||
});
|
||||
|
||||
it("resolves layer bands from defaults via getCoverageBands (no layer dirs exist yet)", () => {
|
||||
expect(getCoverageBands(editorManifest)).toEqual({
|
||||
baseline: DEFAULT_COVERAGE_BANDS.baseline,
|
||||
entities: DEFAULT_COVERAGE_BANDS.entities,
|
||||
"use-cases": DEFAULT_COVERAGE_BANDS["use-cases"],
|
||||
controllers: DEFAULT_COVERAGE_BANDS.controllers,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user