Skip to content

Require backgammon-types ^1.0.5, which is what the code already needs - #148

Merged
nodots merged 1 commit into
developmentfrom
fix/types-1.0.5-range
Jul 30, 2026
Merged

nodots merged 1 commit into
developmentfrom
fix/types-1.0.5-range

Conversation

@nodots

@nodots nodots commented Jul 30, 2026

Copy link
Copy Markdown
Owner

development has been red since 2026-07-27. This is the whole of the fix.

What broke

The resignation-offer merge (50793d1) started using BackgammonResignationOffer in src/Game/cube.ts but left the dependency range at ^1.0.3. That range is satisfied by 1.0.3, so npm had no reason to move off it, and the committed lock stayed on a types version that does not export the member.

npm ci obeys the lock, installs 1.0.3, and the build dies with eight errors in src/Game/cube.tsTS2305: Module '@nodots/backgammon-types' has no exported member 'BackgammonResignationOffer', plus the knock-on TS2339s and two TS2352s.

It passes on a developer machine because node_modules there has 1.0.5 from a manual npm install. That divergence between the lock and the installed tree is what hid this for three days.

Note that npm install --package-lock-only does not fix it — npm keeps a lock entry that still satisfies the declared range. The range itself had to change, and it should: the code genuinely requires 1.0.5.

Also in the diff

The lock's own @nodots/backgammon-core version catches up 1.0.2 → 1.0.3 to match package.json — a stale sync left behind by the 1.0.3 release commit 02e63ef. Nothing else in the lock moves.

Testing

npm run build clean. npx jest src/Game/__tests__ — 126 pass, 4 skipped, 20 suites.

Not verified locally: a from-scratch npm ci. This PR's CI run is the real check, since reproducing the failure locally means discarding the working node_modules.

Unresolved, and not addressed here

Three suites — gnuPositionId, gnuPositionIdBar, and a sibling — crash with SIGABRT on this machine: the native gnubg addon aborts at EvalInitialise because gnubg.wd and gnubg.weights are absent from node_modules. That reproduces on development too and is unrelated to this change, but it means core's position-id tests are not running locally.

The same stale-range pattern may exist in backgammon-ai, backgammon-api and backgammon-client, which the resignation chain also touched. Unchecked.

Blocks #147.

The resignation-offer merge (50793d1) started using BackgammonResignationOffer
but left the dependency range at ^1.0.5's predecessor. ^1.0.3 is satisfied by
1.0.3, so npm had no reason to move, and the committed lock stayed on a types
version that does not export the member.

The result is a build that only works where node_modules happens to have been
refreshed by hand. CI runs npm ci, obeys the lock, installs 1.0.3, and fails to
compile src/Game/cube.ts -- development has been red since 2026-07-27.

The lock's core self-version also catches up 1.0.2 -> 1.0.3 to match
package.json, a stale sync left by the 1.0.3 release commit.
@nodots nodots closed this Jul 30, 2026
@nodots nodots reopened this Jul 30, 2026
@nodots
nodots merged commit 841b29a into development Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant