Skip to content

feat: implement java-tron-up runtime installer#9208

Open
ulissesferreira wants to merge 4 commits into
mainfrom
add-java-tron-up-package-impl
Open

feat: implement java-tron-up runtime installer#9208
ulissesferreira wants to merge 4 commits into
mainfrom
add-java-tron-up-package-impl

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR stacks on #9207 (scaffold PR) and contains the real java-tron-up runtime installer implementation.

It replaces the scaffold template files with:

  • src/install.ts — core java-tron download, extraction, and installation logic
  • src/bin/java-tron-up.ts — CLI entrypoint (wired via bin field in package.json)
  • src/index.ts — updated public exports
  • src/install.test.ts — test suite for the installer
  • README.md — full usage documentation
  • CHANGELOG.md — initial changelog entry
  • knip.config.ts — ignores the sysctl system binary (not an npm package)

Together with #9207, this PR replaces #8825. PR #8825 should not be merged.

Verification

The following checks were run and passed:

  • yarn workspace @metamask/java-tron-up run build
  • yarn workspace @metamask/java-tron-up run test
  • yarn eslint packages/java-tron-up
  • yarn constraints
  • yarn workspace @metamask/java-tron-up run changelog:validate
  • yarn dedupe --check

Changeset vs scaffold branch

Only these paths differ from the scaffold base:

  • packages/java-tron-up/ — real implementation (replaces template)
  • knip.config.ts — added ignoreBinaries: ['sysctl'] entry for this package
  • yarn.lock — minor update

Note

Low Risk
New dev/CI tooling package with no production wallet logic; downloads are checksum-verified and behavior is covered by tests.

Overview
Replaces the @metamask/java-tron-up scaffold with a foundryup-style runtime installer: it downloads and caches pinned FullNode.jar (GreatVoyage-v4.8.1) and Azul Zulu Java (JDK 8 on x64, JDK 17 on arm64), verifies SHA-256 checksums, and installs java-tron-up / java-tron binaries under node_modules/.bin.

The java-tron-up CLI supports default install, cache clean, and flags for cache/bin paths and per-platform URL/checksum overrides; options merge from root package.json (javaTronUp / aliases) and CLI, with partial fullNode / javaRuntime overrides merged into pinned defaults. Cache location follows .yarnrc.yml YAML parsing and Yarn global cache (~/.cache/metamask vs .metamask/cache), namespace-isolated under java-tron-up. The java-tron wrapper propagates child signals as a non-zero exit; cached Java reuse is gated by a .source-checksum marker.

Adds yaml dependency, knip sysctl ignore, expanded README / CHANGELOG, relaxed Jest coverage thresholds, and a broad install.test.ts suite (mocked downloads, cache, config merge, wrapper behavior).

Reviewed by Cursor Bugbot for commit a362e4a. Bugbot is set up for automated code reviews on this repo. Configure here.

@ulissesferreira ulissesferreira requested review from a team as code owners June 19, 2026 12:59
Comment thread packages/java-tron-up/src/install.ts
Comment thread packages/java-tron-up/src/install.ts
@ulissesferreira ulissesferreira force-pushed the add-java-tron-up-package-scaffold branch 2 times, most recently from c1f756d to aed775e Compare June 22, 2026 09:42
Base automatically changed from add-java-tron-up-package-scaffold to main June 22, 2026 10:01
@ulissesferreira ulissesferreira force-pushed the add-java-tron-up-package-impl branch from f125d72 to 52b6278 Compare June 22, 2026 10:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 52b6278. Configure here.

Comment thread packages/java-tron-up/src/install.ts
- Parse .yarnrc.yml as YAML for global-cache detection
- Merge partial fullNode/javaRuntime overrides with pinned defaults
- Verify the cached Java runtime checksum on reuse
- Unify the bin wrapper and propagate signals as a non-zero exit
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