Skip to content

v2.0.0

Choose a tag to compare

@clockworkgr clockworkgr released this 27 Apr 13:38
· 4 commits to main since this release
4499e74

Compare 1.3.3...2.0.0 · commit 4499e74

The 2.0 line is a major rewrite of the project's tooling and runtime expectations. See Migration: 1.x → 2.0 below.

⚠️ Breaking Changes

  • Proto numbers are bigint, not Long. Fields previously typed Long (e.g. gas_wanted, gas_used, sequences, heights) are now bigint. Any code that constructed or read Long values (Long.fromNumber, .toNumber(), .toString(), .eq(), …) needs to switch to bigint (BigInt(x), Number(x), arithmetic with the n suffix). This is a wire-compatible change but a source-incompatible one.
  • RPC layer moved to @gnolang/tm2-rpc. The internal JSON-RPC / WebSocket transport was extracted to a new package (allinbits/tm2-rpc). Direct importers of the previous provider/spec types may need to update import paths.
  • Tested on Node.js 24. No engines field is enforced, but the test/build matrix moved to Node 24 and earlier majors are no longer covered.

Added

  • Dual ESM + CJS distribution. The package now ships as "type": "module" with conditional exportsimport resolves to dist/index.mjs, require resolves to dist/index.cjs, with matching .d.mts / .d.cts types. Both consumer styles continue to work.

Changed

  • Build pipeline migrated to tsdown.
  • Test framework migrated from jest to vitest.
  • Package manager switched from yarn to pnpm.
  • Linting setup modernised; rules unified with sibling JS/TS projects.
  • All runtime and dev dependencies updated to current majors.

Pre-2.0 dependency bumps included

  • @types/node 24.3.0 → 24.5.2 (#241)
  • prettier 3.6.2 → 3.7.3 (#246), 3.7.3 → 3.8.1 (#250)
  • eslint group bumps (#242, #251)
  • actions group bump (#247)
  • feat: Version 2.0 (#256)

Migration: 1.x → 2.0

  1. Replace Long with bigint. Search your codebase for any Long usage that came from this package's proto types and convert:
    • Long.fromNumber(x)BigInt(x)
    • value.toNumber()Number(value)
    • value.toString()value.toString() (unchanged)
    • a.add(b) / a.eq(b)a + b / a === b
  2. Move to a Node 24+ runtime for both build and test. CI/build images pinned to older Node majors should be updated.
  3. Pair with @gnolang/gno-js-client 2.0.x if you use it (older gno-js-client versions depend on tm2-js-client 1.x and will not work with 2.x).
  4. No source changes are required for ESM vs CJS consumers — both paths are still supported via the new conditional exports.
  5. No migration is required for Provider / Wallet / Signer public API shapes — those are preserved.