Register the mongodb extension in the repo root package.json manifest #135

Closed
opened 2026-08-31 22:03:06 +00:00 by david · 1 comment
Owner

Summary

Wire the mongodb extension into the repo's root package.json so pi discovers extensions/mongodb/index.ts and the repo's single install flow hoists the mongodb dependency.

Background

Depends on: #133

The repo root package.json (this repo, pi-extensions-and-skills) already registers sibling extensions in a pi.extensions array and hoists their runtime deps into root dependencies (e.g. pg, dotenv), so one install at the repo root covers all extensions. The mongodb extension must be added the same way. The root manifest uses npm (there is a root lockfile) — check how extensions/postgres was registered and replicate it exactly, including any lockfile update the repo's install flow produces.

The file extensions/mongodb/index.ts does not exist yet (it is created in a later milestone) — the manifest entry is forward-looking and that is expected. Do not create the file here.

Implementation Details

  1. Edit the repo root package.json:
    • Add "extensions/mongodb/index.ts" to the pi.extensions array.
    • Add mongodb to root dependencies (hoisted, alongside the existing pg / dotenv entries), with the same version range the package itself uses.
  2. Run the repo's install flow (npm, matching the root lockfile convention — inspect how the postgres entry updated the lockfile and replicate) so the hoisted dependency is resolved and lockfiles are updated.
  3. Verify the hoisted package resolves at the root.

Acceptance Criteria

  • Root package.json pi.extensions includes "extensions/mongodb/index.ts".
  • Root dependencies includes mongodb.
  • Root lockfile(s) updated to include the hoisted mongodb package.
  • npm ls mongodb (or the repo's equivalent) at the repo root resolves without errors.

Test Plan

grep -n "mongodb" package.json          # manifest + dependency entries
npm ls mongodb                           # resolves at repo root

Also confirm the sibling rows are untouched (postgres/victorialogs still listed in pi.extensions).

## Summary Wire the mongodb extension into the repo's root `package.json` so pi discovers `extensions/mongodb/index.ts` and the repo's single install flow hoists the `mongodb` dependency. ## Background **Depends on:** #133 The repo root `package.json` (this repo, `pi-extensions-and-skills`) already registers sibling extensions in a `pi.extensions` array and hoists their runtime deps into root `dependencies` (e.g. `pg`, `dotenv`), so one install at the repo root covers all extensions. The mongodb extension must be added the same way. The root manifest uses npm (there is a root lockfile) — check how `extensions/postgres` was registered and replicate it exactly, including any lockfile update the repo's install flow produces. The file `extensions/mongodb/index.ts` does not exist yet (it is created in a later milestone) — the manifest entry is forward-looking and that is expected. Do not create the file here. ## Implementation Details 1. Edit the repo root `package.json`: - Add `"extensions/mongodb/index.ts"` to the `pi.extensions` array. - Add `mongodb` to root `dependencies` (hoisted, alongside the existing `pg` / `dotenv` entries), with the same version range the package itself uses. 2. Run the repo's install flow (npm, matching the root lockfile convention — inspect how the postgres entry updated the lockfile and replicate) so the hoisted dependency is resolved and lockfiles are updated. 3. Verify the hoisted package resolves at the root. ## Acceptance Criteria - [ ] Root `package.json` `pi.extensions` includes `"extensions/mongodb/index.ts"`. - [ ] Root `dependencies` includes `mongodb`. - [ ] Root lockfile(s) updated to include the hoisted `mongodb` package. - [ ] `npm ls mongodb` (or the repo's equivalent) at the repo root resolves without errors. ## Test Plan ```bash grep -n "mongodb" package.json # manifest + dependency entries npm ls mongodb # resolves at repo root ``` Also confirm the sibling rows are untouched (postgres/victorialogs still listed in `pi.extensions`).
david closed this issue 2026-08-31 23:40:41 +00:00
Author
Owner

pi-loop opened and merged a pull request for this issue: #153

pi-loop opened and merged a pull request for this issue: https://git.excelera.net/david/pi-extensions-and-skills/pulls/153
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-extensions-and-skills#135
No description provided.