Scaffold tsconfig.json and directory structure for the mongodb extension #134
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills#134
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add
tsconfig.jsonand the directory skeleton (src/,src/tools/, plus aREADME.mdstub) toextensions/mongodb/so subsequent steps have a place to put modules, tools, and their co-located tests.Background
Builds on the package created in "Initialize the extensions/mongodb package (package.json, deps, bun.lock)" — do that first (same milestone). The extension is loaded by pi through a bundler/jiti-style loader, so
tsconfig.jsonmust use module settings compatible with that loading path. Copy the pattern from the sibling extensions:extensions/postgres/tsconfig.jsonandextensions/victorialogs/tsconfig.jsonalready solve exactly this problem for the same repo, so mirror one of them rather than inventing settings from scratch.The
docs/directory already exists atextensions/mongodb/docs/(contains DESIGN.md and the implementation plan) — do not touch it. Do NOT createindex.tsor anysrc/*.tsimplementation files in this step; later milestones add them.Implementation Details
extensions/mongodb/tsconfig.jsonby adaptingextensions/postgres/tsconfig.json(or victorialogs') — module resolution and module format appropriate for jiti/bundler loading (e.g.module: "esnext"or bundler-appropriate values), strict TypeScript on, matching the sibling configs' conventions.extensions/mongodb/src/andextensions/mongodb/src/tools/. They will be populated by later steps; note git does not track empty directories, so the files added in later steps are what actually materialize them — creating the dirs now is about the documented layout.extensions/mongodb/README.mdas a one-line stub identifying the extension (a full README comes in a later milestone).Acceptance Criteria
extensions/mongodb/tsconfig.jsonexists with module settings mirroringextensions/postgres//extensions/victorialogs/(bundler/jiti-compatible).tsc --noEmitruns clean against the empty project (or with the placeholder files) fromextensions/mongodb/.extensions/mongodb/src/andextensions/mongodb/src/tools/exist.extensions/mongodb/README.mdstub exists.Test Plan
If
bunx tscis unavailable in the package yet, verify the config compiles once@types/bunis installed (from the previous step) and diff the config against the postgres sibling.Closing — all acceptance criteria verified as met:
extensions/mongodb/tsconfig.jsonexists (created ind8a29cc) and is byte-identical toextensions/victorialogs/tsconfig.json(module: esnext,moduleResolution: bundler,strict: true) — bundler/jiti-compatible as required. Noteextensions/postgres/has no tsconfig (older flat layout), so victorialogs was the correct sibling to mirror.bunx tsc --noEmitfromextensions/mongodb/exits 0 (verified against the full implementation, not just the empty project).src/andsrc/tools/exist (with.gitkeepfiles from the scaffold commit, plus code added by later steps).README.mdexists — since expanded into a full README by #145, as this issue anticipated.The scaffold artifacts were folded into the package-init commit (
d8a29cc, "133: Initialize the extensions/mongodb package") rather than a dedicated commit, but all deliverables are present and verified.