Skip to content

bug(cli): @objectstack/cli 17.3.0 pulls better-sqlite3 13.0.3 into the subtree where better-auth@1.7.2 declares peer better-sqlite3@^12.0.0 — every fresh resolve warns unmet peer #16813

Description

@claude

Found while declaring dependencies in hotcrm (objectstack-ai/hotcrm#1769, PR objectstack-ai/hotcrm#1771). Pre-existing and out of scope there — that PR's pnpm-lock.yaml packages:/snapshots: region is byte-identical to its base, so it moves this in neither direction. Filed here rather than compensated for downstream, per hotcrm's pure-metadata-app rule.

What a plain pnpm install reports

In a hotcrm checkout on @objectstack/* 17.3.0, whenever pnpm actually runs the resolution step (it is skipped when the lockfile is already satisfied, which is why this is easy to miss):

 WARN  Issues with peer dependencies found
.
└─┬ @objectstack/cli 17.3.0
  └─┬ @objectstack/runtime 17.3.0
    └─┬ @objectstack/plugin-auth 17.3.0
      └─┬ better-auth 1.7.2
        └── ✕ unmet peer better-sqlite3@^12.0.0: found 13.0.3 in @objectstack/cli

The two readings behind it

  • better-auth@1.7.2 declares better-sqlite3 as a peer at ^12.0.0.
  • @objectstack/cli@17.3.0 brings better-sqlite3@13.0.3 into its own subtree, and that is the copy better-auth binds to along the CLI path. Major 13 is outside ^12.0.0.

Both are visible in the consumer lockfile: better-sqlite3@13.0.3 has its own packages: entry, and the snapshot keys spell the binding out, e.g. better-auth@1.7.2(better-sqlite3@13.0.3)(mongodb@7.5.0)(vitest@4.1.10).

The app-level path is a different story and is fine: hotcrm declares better-sqlite3: ^12.11.1 as an optional dependency, so its own @objectstack/plugin-auth snapshot resolves against better-sqlite3@12.11.1. The mismatch is entirely inside the platform's own tree, which is why it cannot be fixed downstream by a consumer's declaration.

Why it is worth a card rather than a shrug

Nothing measured has failed: hotcrm's suite is green (164 files / 3438 tests) and objectstack build succeeds on this tree. So this is a range violation, not an observed break — but it is the kind that reports as an advisory until the day better-auth's SQLite adapter touches an API that moved between better-sqlite3 12 and 13, and then it reports as a runtime error with no declaration pointing at the cause. It is also in the same dependency family as #16186, where a floating range on this exact package family did produce a real break, so the "a caret range cannot protect you here" lesson from that card applies to the same subtree.

Suggested shape of a fix, for triage rather than as a decision

Either bring @objectstack/cli's better-sqlite3 back inside ^12, or confirm better-auth 1.7.2 is in fact compatible with 13.x and get the peer range widened upstream (or the peer satisfied deliberately, with the reason recorded next to the pin). Which of those is right is a maintainer call — this card only establishes that the tree currently satisfies neither.

Reproduce

In a hotcrm checkout at @objectstack/* 17.3.0, remove node_modules and run a plain pnpm install (the warning is suppressed on a no-op install because the resolution step is skipped).


Generated by Claude Code

Activity

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

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions