Skip to content

Remove unused devDependency @types/lowdb (superseded by lowdb's own bundled types) #76

Description

@pinecone-groundskeeper

Problem

explorer/package.json lists @types/lowdb: "^1.0.15" as a devDependency
(line 19), alongside the runtime dependency lowdb: "^7.0.1" (line 26).

@types/lowdb@1.0.15 provides type definitions for lowdb's v1 API (the
low(adapter) factory function and old adapter shapes). The pinned lowdb@7
no longer matches that API — it ships its own bundled TypeScript types
directly in the package ("types": "./lib" plus a typesVersions map for the
./node and ./browser subpaths, per node_modules/lowdb/package.json), which
is what the actual imports in explorer/src/app/api/opinion/route.ts
(LowSync, JSONFile, JSONFileSync from 'lowdb' / 'lowdb/node') resolve
against. @types/lowdb is therefore never consulted by the TypeScript compiler
for these imports — TS resolves types straight from lowdb's own bundled
declarations.

Confirmed nothing in the codebase imports from @types/lowdb directly (it
isn't importable as a module anyway — @types/* packages only supply ambient
type declarations): a repo-wide search only turns up the dependency
declaration itself in explorer/package.json and its lockfile entries in
explorer/pnpm-lock.yaml.

Acceptance criteria

  • @types/lowdb is removed from explorer/package.json devDependencies.
  • explorer/pnpm-lock.yaml is regenerated (via pnpm install) so the stale
    entry is dropped.
  • pnpm run build, pnpm run lint, and pnpm run test in explorer/ still
    succeed, confirming no code actually depended on @types/lowdb's type
    declarations.

Scope

Remove only the unused @types/lowdb devDependency and regenerate the
lockfile. Out of scope: any change to the lowdb runtime dependency itself or
to the code that uses it.

Generated by GitHub Maintenance Audit · sonnet50 · 80.4 AIC · ⌖ 6.1 AIC · ⊞ 7.9K · ◷

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:maintenance-auditFiled by the maintenance audit agent; it recognizes its own backlog by this labelmaintenanceIn scope for the maintenance agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions