Release v0.2.0: tag emissions schedule + fix Node ESM resolution#2
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
afi-corepinsafi-mathso it can derivetotalRewardPoolfrom the emissions schedule, but two problems made that pin unusable:afi-mathhad zero tags, soafi-corepinned a raw commit SHA — and the SHA it picked (2042ed3, 2025-12-16) predated the emissions module (src/emissions/emissionsSchedule.ts, added in1a524d3on 2026-01-25, 40 days later). The pinned tree didn't even containemissions/.src/index.tsre-exported submodules with extensionless specifiers ("./timeValue/timeValue"). The package is"type": "module", sotscemits those verbatim and Node's ESM loader throwsCannot find module .../dist/timeValue/timeValue. The library only resolved under bundlers/vitest, never in a plain Node-ESM consumer likeafi-core.This PR cuts the first tagged release,
v0.2.0, and makes it actually consumable.What
fix(esm)— add explicit.jsextensions to the relative re-exports insrc/index.tsso the compileddist/index.jsresolves under Node's native ESM loader. Verified with a Nodeimport()smoke test (emissions.buildEmissionsScheduleis now reachable).chore(release): v0.2.0— bumppackage.json0.1.0 → 0.2.0and add aCHANGELOG.md. Minor bump because it's additive (the emissions schedule) over0.1.0.Verification
npm run build✅npm test✅ — 92/92 passing (4 suites)dist/index.js✅ — emissions exports presentTag
v0.2.0is tagged locally on the release commit (which containssrc/emissions/). The tag push was blocked by this environment's egress policy — pushes torefs/tags/*return403(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:Until then,
afi-corepins the release commit SHA (6091cbf) overgit+https, which is equivalent; it can be flipped to#v0.2.0once the tag exists.Related
Paired with the
afi-corere-pin PR (same branch name) that pointsafi-coreat this release overgit+https.Generated by Claude Code