Skip to content

Commit 3409241

Browse files
hotlongclaude
andcommitted
fix(plugin-auth): pin the better-auth family to an exact 1.7.2 (#16186)
`@better-auth/core@1.7.3` deleted `createLocalAccountIssuer` and `createOAuthAccountIssuer` from `@better-auth/core/db` — and the whole `account.issuer` column with them — in a PATCH release. `plugin-auth` imports both names statically, so every consumer of published 17.1.0 / 17.2.0 / 17.3.0 resolved 1.7.3 through the declared `^1.7.2` range and could not load the plugin at all. This repo's lockfile held 1.7.2, so every CI job here was green while the artifact it produced was broken on install. The declared range and the workspace override target both become exact 1.7.2, so the version this repo tests is the version a consumer resolves. Resolutions are unchanged: the lockfile already held 1.7.2 for all eleven family members, and `pnpm install --lockfile-only` moves only the echoed specifier strings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 554a160 commit 3409241

3 files changed

Lines changed: 99 additions & 67 deletions

File tree

packages/plugins/plugin-auth/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
"gen:test-typecheck-debt": "tsx ../../../scripts/check-test-typecheck.mts --update --package packages/plugins/plugin-auth --project tsconfig.test.json"
2727
},
2828
"dependencies": {
29-
"@better-auth/core": "^1.7.2",
30-
"@better-auth/oauth-provider": "^1.7.2",
31-
"@better-auth/scim": "^1.7.2",
32-
"@better-auth/sso": "^1.7.2",
29+
"@better-auth/core": "1.7.2",
30+
"@better-auth/oauth-provider": "1.7.2",
31+
"@better-auth/scim": "1.7.2",
32+
"@better-auth/sso": "1.7.2",
3333
"@noble/hashes": "^2.3.0",
3434
"@objectstack/core": "workspace:*",
3535
"@objectstack/platform-objects": "workspace:*",
3636
"@objectstack/rest": "workspace:*",
3737
"@objectstack/service-messaging": "workspace:*",
3838
"@objectstack/spec": "workspace:*",
3939
"@objectstack/types": "workspace:*",
40-
"better-auth": "^1.7.2",
40+
"better-auth": "1.7.2",
4141
"jose": "^6.2.8"
4242
},
4343
"devDependencies": {

pnpm-lock.yaml

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ onlyBuiltDependencies:
2525
# ⛔ SELECTOR SHAPE — the one rule every OSV pin below now follows (#6095).
2626
# An OSV pin states a FLOOR ("nothing below the patched line"), so its selector
2727
# must cover the whole major it guards and its target must be a range that
28-
# floats up inside that major. Concretely:
28+
# floats up inside that major — UNLESS the package's export surface is one we
29+
# compile against, in which case the target is an EXACT version and lifting it
30+
# is a reviewed edit (the better-auth family, #16186: 1.7.3 deleted a public
31+
# export in a PATCH). The selector rule below is unchanged either way, and it
32+
# is what keeps an exact target a one-line lift.
33+
# Concretely:
2934
# 'pkg@>=<affected floor> <next major above the target>': '^<patched>'
3035
# Never write the selector's exclusive upper bound AT the target's own version
3136
# line (`pkg@<X.Y.Z` -> `^X.Y.Z`). That shape self-invalidates the day X.Y.Z
@@ -43,9 +48,10 @@ onlyBuiltDependencies:
4348
# the three zero-consumer pins awaiting a #5835-style ruling
4449
# (@tootallnate/once, react-router, @sveltejs/kit). (`@better-auth/scim` was
4550
# the other carve-out while it held the rc; #3653 moved it onto stable with
46-
# the bound at the major boundary, and #13715 returned its TARGET to the
47-
# family's `^` — see its note below. Both are about the resolved version, not
48-
# the selector shape this rule governs.)
51+
# the bound at the major boundary, #13715 returned its TARGET to the family's
52+
# `^`, and #16186 moved the whole family back to an EXACT target — see its
53+
# note below. All three are about the resolved version, not the selector shape
54+
# this rule governs.)
4955
# - esbuild: GHSA-gv7w-rqvm-qjhr (high). tsup/tsx/vite pulled 0.27.7 / 0.28.0
5056
# (< 0.28.1); force the patched line everywhere.
5157
# - form-data: GHSA-hmw2-7cc7-3qxx (high) — CRLF injection via unescaped
@@ -135,10 +141,15 @@ onlyBuiltDependencies:
135141
# undici above).
136142
# IMPORTANT: these overrides do NOT ship with published packages — a
137143
# downstream `npx create-objectstack` install resolves plugin-auth's own
138-
# declared ranges. plugin-auth therefore declares the same `^1.7.1` in its
139-
# dependencies (a `^1.6.23` range there resolved to the broken 1.6.23 mix
140-
# and 500'd every fresh 15.1.0 project). Keep both in sync — CI enforces
141-
# this via scripts/check-override-consistency.mjs.
144+
# declared ranges. plugin-auth therefore declares the same exact `1.7.2`
145+
# in its dependencies (a `^1.6.23` range there resolved to the broken
146+
# 1.6.23 mix and 500'd every fresh 15.1.0 project; a `^1.7.2` range there
147+
# resolved to 1.7.3 and made every fresh 17.1.0–17.3.0 project unloadable,
148+
# #16186). Keep both in sync — CI enforces this via
149+
# scripts/check-override-consistency.mjs, and
150+
# scripts/check-vendor-export-contract.mjs enforces that the DECLARED
151+
# range admits exactly one version and that version exports every symbol
152+
# plugin-auth imports.
142153
# - uuid: GHSA-w5hq-g745-h8pq (high) — pulled 8.3.2 transitively; the fix
143154
# first lands in 11.1.1. Pin to the ^11.1.1 LTS line (uuid `legacy-11`
144155
# dist-tag) rather than the latest major to keep the jump conservative.
@@ -165,10 +176,30 @@ overrides:
165176
'undici@>=7.23.0 <8.0.0': '^7.29.0'
166177
# better-auth family — kept on one line (see @better-auth/oauth-provider note).
167178
# Off the 1.7.0-rc.2 prerelease and onto the stable line (#3002). Bounds sit
168-
# at the MAJOR boundary, so a future advisory lift moves only the target.
169-
'better-auth@<2.0.0': '^1.7.2'
170-
'@better-auth/core@<2.0.0': '^1.7.2'
171-
# scim carries the family's `^` again — see the @better-auth/scim note
179+
# at the MAJOR boundary, so a future advisory lift moves only the TARGET.
180+
#
181+
# ⛔ EXACT TARGETS, not `^`, since #16186. This family removes public exports
182+
# in PATCH releases: 1.7.3 deleted `createLocalAccountIssuer` /
183+
# `createOAuthAccountIssuer` and the whole `account.issuer` column from
184+
# `@better-auth/core/db` (better-auth/better-auth#10909 rolled the
185+
# issuer-scoped account identity back), and `@objectstack/plugin-auth`
186+
# statically imports both names. A caret cannot express "the export surface
187+
# we compile against", so `^` here means the tested version and the shipped
188+
# version are free to differ — which is exactly what happened: this
189+
# lockfile held 1.7.2 and every CI job was green while every consumer of
190+
# published 17.1.0–17.3.0 resolved 1.7.3 and could not load the plugin at
191+
# all. The selectors keep their `<2.0.0` major boundary, so lifting the
192+
# family later is still a target-only edit.
193+
#
194+
# These targets are held EQUAL to the ranges `@objectstack/plugin-auth`
195+
# declares (`scripts/check-override-consistency.mjs` cross-checks that the
196+
# declared range admits the target; `pnpm check:vendor-export-contract`
197+
# requires the declared range to be exact and to export what we import).
198+
# Move all eleven together, in one commit, or better-auth init throws and
199+
# every auth endpoint 500s.
200+
'better-auth@<2.0.0': '1.7.2'
201+
'@better-auth/core@<2.0.0': '1.7.2'
202+
# scim carries the family's target — see the @better-auth/scim note
172203
# above. It was held at 1.7.1 EXACT, one deliberate step behind `^1.7.1`,
173204
# because `^1.7.1` then resolved scim to 1.7.2 while the installed family
174205
# was still 1.7.1: scim 1.7.2 peers `better-auth`/`@better-auth/core` at
@@ -183,29 +214,30 @@ overrides:
183214
# for all eleven; the install resolves all eleven to 1.7.2 (one copy each),
184215
# so scim's `^1.7.2` peers are SATISFIED by the installed 1.7.2 pair rather
185216
# than silenced — the condition the exact hold existed for no longer holds.
186-
# `^` rather than a fresh exact pin for two reasons. Structural: the two
187-
# sibling standalone plugins, oauth-provider and sso, peer the family in
188-
# exactly the same shape (`better-auth`/`@better-auth/core` at `^1.7.2`) and
189-
# carry `^`; an exact scim would be the one asymmetric member with no reason
190-
# left to state. Security: this pin is also the GHSA-j8v8-g9cx-5qf4 floor,
191-
# and a floor that cannot take the next patch is the wrong shape for a
192-
# package with that history. Measured, so it is not a preference: `^1.7.2`
193-
# and exact `1.7.2` produce byte-identical resolutions today — two
194-
# `pnpm install --lockfile-only` runs differ only in the echoed override
195-
# string and the echoed importer specifier, in no resolved version and no
196-
# peer-resolution suffix — so the shape is chosen on durability, not on a
197-
# resolution difference that does not exist.
217+
# It carried `^1.7.2` from #13715 until #16186, on two arguments the 1.7.3
218+
# release answered. Structural — "the siblings peer `^1.7.2` and carry `^`,
219+
# so an exact scim would be the one asymmetric member" — is moot now that
220+
# ALL eleven are exact; the family is symmetric again, one line lower.
221+
# Security — "this pin is also the GHSA-j8v8-g9cx-5qf4 floor, and a floor
222+
# that cannot take the next patch is the wrong shape" — was the reasoning
223+
# 1.7.3 refuted: taking the next patch UNREVIEWED is what a floor must not
224+
# do when the vendor deletes public exports in one. 1.7.2 is above the
225+
# patched line for GHSA-j8v8-g9cx-5qf4 and GHSA-p2fr-6hmx-4528, so the floor
226+
# still holds; what changed is that lifting it is now a reviewed edit, which
227+
# is the only way an export-surface change gets read before it ships. That
228+
# review has somewhere to land: `pnpm check:vendor-export-contract` fails on
229+
# a lift whose new version drops a symbol `plugin-auth` imports.
198230
# What stays true: the whole family still moves as ONE line, and a bump that
199-
# moves scim alone is still the mistake the ruling named.
200-
'@better-auth/scim@<2.0.0': '^1.7.2'
201-
'@better-auth/oauth-provider@<2.0.0': '^1.7.2'
202-
'@better-auth/sso@<2.0.0': '^1.7.2'
203-
'@better-auth/drizzle-adapter@<2.0.0': '^1.7.2'
204-
'@better-auth/kysely-adapter@<2.0.0': '^1.7.2'
205-
'@better-auth/memory-adapter@<2.0.0': '^1.7.2'
206-
'@better-auth/mongo-adapter@<2.0.0': '^1.7.2'
207-
'@better-auth/prisma-adapter@<2.0.0': '^1.7.2'
208-
'@better-auth/telemetry@<2.0.0': '^1.7.2'
231+
# moves scim alone is still the mistake the #3653 ruling named.
232+
'@better-auth/scim@<2.0.0': '1.7.2'
233+
'@better-auth/oauth-provider@<2.0.0': '1.7.2'
234+
'@better-auth/sso@<2.0.0': '1.7.2'
235+
'@better-auth/drizzle-adapter@<2.0.0': '1.7.2'
236+
'@better-auth/kysely-adapter@<2.0.0': '1.7.2'
237+
'@better-auth/memory-adapter@<2.0.0': '1.7.2'
238+
'@better-auth/mongo-adapter@<2.0.0': '1.7.2'
239+
'@better-auth/prisma-adapter@<2.0.0': '1.7.2'
240+
'@better-auth/telemetry@<2.0.0': '1.7.2'
209241
'uuid@<12.0.0': '^11.1.1'
210242
'postcss@<9.0.0': '^8.5.10'
211243
'cookie@<0.8.0': '^0.7.0'

0 commit comments

Comments
 (0)