Skip to content

Convert pulpo-schema to TypeScript#15

Merged
camacho merged 1 commit into
mainfrom
ts-pulpo-schema
Jul 5, 2026
Merged

Convert pulpo-schema to TypeScript#15
camacho merged 1 commit into
mainfrom
ts-pulpo-schema

Conversation

@camacho

@camacho camacho commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Wave-A TypeScript conversion (engines pilot pattern) — FACTORY special case: default export typed (schema: PulpoSchema) => (args: TransformArgs) => string; empty-schema return-content guard preserved. Includes this package's CONSUMER_SNIPPETS entry (structural schema stub exercises factory + transform signatures, compile-only).

Package-specific: pulpo@1.4.2's shipped .d.ts has a dangling triple-slash reference that fails at the IMPORT site (TS2306) — skipLibCheck cannot cover resolution failures, so a package-scoped pulpo-shim.d.ts types just the constructor + document() surface used (reviewer verified by removing the shim and reproducing the error). PulpoSchema stays structural per plan.

Logic byte-for-byte vs main (review-verified). Validation: typecheck + lint + prettier clean · workspace tests green · tarball gate incl. factory consumer-typecheck (OK line verified) · node example.ts exit 0 · docs idempotent · code-reviewed (APPROVE)

…hangeset

- index.ts/types.ts type the SCHEMA factory as (schema: PulpoSchema) => (args: TransformArgs) => string
- pulpo@1.4.2 ships a broken lib/index.d.ts (dangling triple-slash reference,
  resolves as 'not a module'); add a narrow ambient shim scoped to this package
  rather than importing pulpo's types
- flip package.json to dist/ build output (tsconfig.build.json mirrors engines)
- add markdown-magic-pulpo-schema consumer-typecheck snippet to tarball-gate.mjs,
  exercising the factory + returned transform against TransformArgs
- changeset: minor bump for shipped type declarations
@camacho camacho force-pushed the ts-pulpo-schema branch from 9af677f to 28981b0 Compare July 5, 2026 21:03
@camacho camacho merged commit 147ed25 into main Jul 5, 2026
2 checks passed
@camacho camacho deleted the ts-pulpo-schema branch July 5, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant