Skip to content

Release v0.2.0: tag emissions schedule + fix Node ESM resolution#2

Merged
Gio2050 merged 2 commits into
mainfrom
claude/afi-core-math-pin-fix-8u0olg
Jun 29, 2026
Merged

Release v0.2.0: tag emissions schedule + fix Node ESM resolution#2
Gio2050 merged 2 commits into
mainfrom
claude/afi-core-math-pin-fix-8u0olg

Conversation

@Gio2050

@Gio2050 Gio2050 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Why

afi-core pins afi-math so it can derive totalRewardPool from the emissions schedule, but two problems made that pin unusable:

  1. No durable ref to pin to. afi-math had zero tags, so afi-core pinned a raw commit SHA — and the SHA it picked (2042ed3, 2025-12-16) predated the emissions module (src/emissions/emissionsSchedule.ts, added in 1a524d3 on 2026-01-25, 40 days later). The pinned tree didn't even contain emissions/.
  2. The package wasn't importable under Node ESM. src/index.ts re-exported submodules with extensionless specifiers ("./timeValue/timeValue"). The package is "type": "module", so tsc emits those verbatim and Node's ESM loader throws Cannot find module .../dist/timeValue/timeValue. The library only resolved under bundlers/vitest, never in a plain Node-ESM consumer like afi-core.

This PR cuts the first tagged release, v0.2.0, and makes it actually consumable.

What

  • fix(esm) — add explicit .js extensions to the relative re-exports in src/index.ts so the compiled dist/index.js resolves under Node's native ESM loader. Verified with a Node import() smoke test (emissions.buildEmissionsSchedule is now reachable).
  • chore(release): v0.2.0 — bump package.json 0.1.0 → 0.2.0 and add a CHANGELOG.md. Minor bump because it's additive (the emissions schedule) over 0.1.0.

Verification

  • npm run build
  • npm test ✅ — 92/92 passing (4 suites)
  • Node ESM smoke import of dist/index.js ✅ — emissions exports present

Tag

v0.2.0 is tagged locally on the release commit (which contains src/emissions/). The tag push was blocked by this environment's egress policy — pushes to refs/tags/* return 403 (only the feature branch ref is writable), and per the proxy rules I don't retry policy denials. Please push the tag once this merges:

git checkout main && git pull
git tag -a v0.2.0 -m "afi-math v0.2.0 — canonical emissions schedule + Node ESM fix"
git push origin v0.2.0

Until then, afi-core pins the release commit SHA (6091cbf) over git+https, which is equivalent; it can be flipped to #v0.2.0 once the tag exists.

Related

Paired with the afi-core re-pin PR (same branch name) that points afi-core at this release over git+https.


Generated by Claude Code

claude added 2 commits June 29, 2026 10:03
The package is "type": "module", but src/index.ts re-exported submodules
with extensionless specifiers (e.g. "./timeValue/timeValue"). tsc preserves
those verbatim, so the compiled dist/index.js failed under Node's native
ESM loader with 'Cannot find module .../dist/timeValue/timeValue'. This made
the library unusable from Node-ESM consumers (afi-core), even though vitest
and bundlers resolved it fine. Add explicit .js extensions so dist resolves
in plain Node ESM.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JLNgbdqSpWjEpbMxjAZyG6
First durable, tagged release. Includes the canonical emissions schedule
(src/emissions/) and the ESM resolution fix, so downstream consumers can
pin to the v0.2.0 tag (or its commit SHA) instead of a raw pre-emissions SHA.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JLNgbdqSpWjEpbMxjAZyG6
@Gio2050 Gio2050 merged commit 623a149 into main Jun 29, 2026
1 check failed
@Gio2050 Gio2050 deleted the claude/afi-core-math-pin-fix-8u0olg branch July 2, 2026 05:35
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.

2 participants