chore: drop prompt registry codegen for stable raw imports #26

Merged
erik merged 2 commits from chore/cleanup-raw-imports-hack into main 2026-05-26 01:11:46 +00:00
Member

Refs: #17


Summary

Deno 2.8.0 stabilized raw imports (with { type: "text" }), so the workaround that inlined prompt markdown into a generated TypeScript file is no longer needed.

  • src/prompts/registry.ts now imports each *.md directly with type: "text" and exports prompts / Role from there.
  • Removed src/prompts/registry.gen.ts and scripts/gen-prompts.ts.
  • Removed the just gen-prompts recipe, the registry.gen.ts drift check from test::gen-drift, and the just gen-prompts step from publish / publish-check.
  • Dropped the src/prompts/*.md entry from the JSR publish exclude list so consumers can resolve the text imports.

Test plan

  • just validate (format, lint, types, gen-drift, coverage, audit, secrets, sast)
  • deno run -A src/main.ts dev prompt simple renders the expected prompt at runtime
Refs: #17 --- ## Summary Deno 2.8.0 stabilized raw imports (`with { type: "text" }`), so the workaround that inlined prompt markdown into a generated TypeScript file is no longer needed. - `src/prompts/registry.ts` now imports each `*.md` directly with `type: "text"` and exports `prompts` / `Role` from there. - Removed `src/prompts/registry.gen.ts` and `scripts/gen-prompts.ts`. - Removed the `just gen-prompts` recipe, the `registry.gen.ts` drift check from `test::gen-drift`, and the `just gen-prompts` step from `publish` / `publish-check`. - Dropped the `src/prompts/*.md` entry from the JSR publish exclude list so consumers can resolve the text imports. ## Test plan - [x] `just validate` (format, lint, types, gen-drift, coverage, audit, secrets, sast) - [x] `deno run -A src/main.ts dev prompt simple` renders the expected prompt at runtime
chore: drop prompt registry codegen in favor of stable raw imports
All checks were successful
Validate / validate (pull_request) Successful in 21s
d074680159
Deno 2.8.0 stabilized raw imports (`with { type: "text" }`), so the gen-prompts.ts workaround and the inlined registry.gen.ts are no longer needed. Replace registry.ts with direct text imports, delete the generator and its drift check, and stop excluding src/prompts/*.md from the JSR publish so downstream consumers can resolve the imports.
Merge branch 'main' of https://git.tfks.net/tfks/fjx into chore/cleanup-raw-imports-hack
All checks were successful
Validate / validate (pull_request) Successful in 26s
c9a63921db
erik merged commit ca1e649b0f into main 2026-05-26 01:11:46 +00:00
erik deleted branch chore/cleanup-raw-imports-hack 2026-05-26 01:11:46 +00:00
Sign in to join this conversation.
No description provided.