Skip to content

chore!: single-source the version in package.json - #124

Merged
yeboster merged 1 commit into
mainfrom
chore/version-from-package
Aug 29, 2026
Merged

chore!: single-source the version in package.json#124
yeboster merged 1 commit into
mainfrom
chore/version-from-package

Conversation

@yeboster

Copy link
Copy Markdown
Contributor

src/version.ts was a hand-maintained constant that nothing kept in step with package.json — the file said 6.3.0 while the published package was 6.3.1. package.json is what npm publishes and what the tag-triggered release workflow uses, so it is the only place a version needs to live.

Breaking

  • VERSION is no longer exported from the package root.
  • MetaNamesSdk#version is gone.

Nothing in this workspace reads either (checked app and app-legacy). Consumers who want the version can read it from package.json.

Version bumped to 7.0.0.

Note

This is the second breaking change queued for 7.0.0; #123 changes createTransaction's signature (drops isMainnet) for anyone deep-importing dist/transactions. The two branches touch different files and can merge in either order.

Verification

tsc, eslint, yarn build clean. 269/269 live testnet tests pass.

https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb

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
@github-actions

Copy link
Copy Markdown

Total Coverage: 91.81%

Coverage Report
File Branch Funcs Lines Uncovered Lines
src
   actions.ts 100% 100% 100%
   index.ts 100% 100% 100%
   interface.ts 100% 100% 100%
   meta-names-sdk.ts 75% 75% 95.45% 20, 42, 43
   partisia-name-system.ts 58% 87.50% 84.07% 106, 114, 12, 139, 152, 160, 164, 169, 170, 171, 178, 180, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 29, 33, 42, 49, 54, 55, 7, 78, 82
src/actions
   domain.ts 64.29% 100% 100% 34, 43, 55, 70, 73
   record.ts 77.78% 100% 100% 13, 47
src/models
   domain.ts 100% 83.33% 95.95% 45, 46, 47
   index.ts 100% 100% 100%
src/models/helpers
   domain.ts 100% 100% 100%
src/providers
   config.ts 66.67% 100% 98.11% 40, 49, 50
   index.ts 100% 100% 100%
   secrets.ts 45.45% 62.50% 78.57% 19, 23, 24, 25, 26, 27, 29, 30, 44, 50, 51, 52, 53, 56, 57, 58, 59, 62, 63, 64, 65
src/providers/config
   mainnet.ts 100% 100% 100%
   testnet.ts 100% 100% 100%
src/repositories
   contract-repository.ts 76.92% 100% 98.28% 101, 111, 134, 135, 137, 138, 140, 141, 143, 144, 153, 169, 191, 207, 32, 44, 45, 55, 61
   domain-repository.ts 60% 100% 100% 102, 113, 117, 118, 133, 142, 150, 176, 220, 225, 240, 256, 262, 269, 34, 53, 54, 96, 98, 99
   index.ts 100% 75% 100%
   record-repository.ts 71.43% 100% 100% 24, 34, 50, 60
src/repositories/contracts
   meta-names-contract-repository.ts 84.62% 88.89% 86.14% 57, 58, 59, 60, 61, 62, 63, 64, 78, 79, 80, 81, 82, 83, 84, 94
src/repositories/helpers
   avl-client.ts 80% 77.78% 61.62% 16, 22, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 95
   client.ts 92.31% 100% 100% 54
   contract.ts 75% 100% 92.45% 41, 42, 43, 44, 45, 50
   sharded-client.ts 66.67% 100% 100% 41, 52
src/transactions
   authentication.ts 100% 25% 38.79% 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 94, 95, 96, 97, 98, 99
   index.ts 46.15% 37.50% 85.38% 102, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 125, 16, 17, 18, 19, 69, 73, 82, 83, 84, 86, 86, 87, 88
src/validators
   base-validator.ts 100% 100% 100%
   domain-validator.ts 87.50% 100% 100% 29, 30, 31
   index.ts 100% 100% 100%
   record-validator.ts 100% 100% 100%
src/validators/idna
   index.ts 81.54% 100% 95.93% 108, 110, 110, 111, 118, 119, 120, 121, 122, 123, 124, 125, 136, 138, 139, 144, 151, 155, 168, 210, 46
   table.ts 100% 100% 100%
src/validators/records
   default-validator.ts 100% 100% 100%
   discord-validator.ts 100% 100% 100%
   email-validator.ts 100% 100% 100%
   main-validator.ts 100% 100% 100%
   price-validator.ts 100% 100% 100%
   regex-validator.ts 100% 100% 100%
   twitter-validator.ts 100% 100% 100%
   uri-validator.ts 100% 100% 100%
   wallet-validator.ts 100% 100% 100%
test
test/helpers
   config.ts 0% 100% 100% 7
   helper.ts 100% 60% 68% 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42
   index.ts 100% 100% 100%

@yeboster
yeboster merged commit 9c3516e into main Aug 29, 2026
8 checks passed
@yeboster
yeboster deleted the chore/version-from-package branch August 29, 2026 11:30
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
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