chore!: single-source the version in package.json - #124
Merged
Conversation
BREAKING CHANGE: `VERSION` is no longer exported and `MetaNamesSdk#version` is gone. Read the version from package.json instead. `src/version.ts` was hand-maintained and nothing kept it in step with package.json, which is what npm actually publishes: it said 6.3.0 while the released package was 6.3.1. Neither export is used by any consumer in this workspace. Version bumped to 7.0.0. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
|
Total Coverage: 91.81% Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
yeboster
added a commit
that referenced
this pull request
Aug 30, 2026
* fix: clean dist before build and retry throttled reader responses Three release-blocking issues found while reviewing v7 end to end. `yarn build` wrote into whatever `dist/` was already there, so files deleted from `src` survived in the published package: 7.0.0 packed with `dist/transactions/helper.js` (deleted in #123) and `dist/version.js` (deleted in #124), both reachable through the `./dist/*` exports pattern. `prepublishOnly` runs `build`, so the fix is a clean step in `build` itself. A reader node under load answers 429 or 503. `handleFetch` only resolves a body on HTTP 200, so those answers arrived at callers as `undefined` and surfaced as `Error: Contract not found` -- observed against the app's `/api/domains/recent` and `/api/domains/stats` routes while running its end-to-end suite. Retry them. 404 still falls through to `undefined`, which is how a missing AVL value is reported. `privateKeyToAddress` and the signing backends had no exports entry, leaving `@metanames/sdk/dist/transactions` as the only way in. Add `./transactions`. * fix: keep directory subpath imports resolvable 6.3.1 shipped no exports map, so `@metanames/sdk/dist/models` and its siblings resolved through plain file lookup. The exports map added in v7 turns those into `./dist/models.js`, which does not exist, and Node does not fall back to a directory index. Consumers on those specifiers would break on upgrade for no reason: each directory has an `index.js`, so the entries point at it. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb * chore: drop the scratch notes from the branch Working notes committed by accident in the previous commit. #125 squash merges, so main never carries them. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb * fix: drop the dist subpaths from the exports map `./dist/*` was carried over so consumers importing the build output kept working. That advertises the build layout as API: the paths hard-code the CJS tree, and nothing outside it can move without breaking someone. v7 is the major to stop. The named subpaths cover every use. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
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.
src/version.tswas a hand-maintained constant that nothing kept in step withpackage.json— the file said6.3.0while the published package was6.3.1.package.jsonis what npm publishes and what the tag-triggered release workflow uses, so it is the only place a version needs to live.Breaking
VERSIONis no longer exported from the package root.MetaNamesSdk#versionis gone.Nothing in this workspace reads either (checked
appandapp-legacy). Consumers who want the version can read it frompackage.json.Version bumped to 7.0.0.
Note
This is the second breaking change queued for 7.0.0; #123 changes
createTransaction's signature (dropsisMainnet) for anyone deep-importingdist/transactions. The two branches touch different files and can merge in either order.Verification
tsc, eslint,
yarn buildclean. 269/269 live testnet tests pass.https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb