Skip to content

Add java-tron-up package#8825

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

Add java-tron-up package#8825
ulissesferreira wants to merge 3 commits into
mainfrom
add-java-tron-up-package

Conversation

@ulissesferreira
Copy link
Copy Markdown
Contributor

@ulissesferreira ulissesferreira commented May 15, 2026

Description

Adds @metamask/java-tron-up to the core monorepo using the generated package structure, then replaces the scaffold with the existing java-tron runtime installer implementation.

Ownership follows the runtime tooling/platform pattern and includes Networks, matching the Tron Snap ownership direction.

Changes

  • Adds the java-tron runtime installer package under packages/java-tron-up.
  • Publishes the java-tron-up CLI bin from dist/bin/java-tron-up.mjs.
  • Adds package references, lockfile entry, README package listing, CODEOWNERS, and teams.json ownership.

Verification

  • 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 lint:misc --check packages/java-tron-up/package.json packages/java-tron-up/README.md packages/java-tron-up/src/index.ts packages/java-tron-up/src/install.ts packages/java-tron-up/src/install.test.ts packages/java-tron-up/src/bin/java-tron-up.ts packages/java-tron-up/jest.config.js .github/CODEOWNERS teams.json README.md tsconfig.json tsconfig.build.json
  • yarn readme-content:check
  • yarn lint:teams
  • yarn workspace @metamask/java-tron-up run changelog:validate

Note

Medium Risk
Introduces a new CLI that downloads and executes pinned external Java/TRON artifacts, which can affect CI/dev environments if URLs/checksums or cache logic are wrong. No existing runtime/auth/business logic is modified beyond adding the package and wiring it into the monorepo.

Overview
Adds a new package, @metamask/java-tron-up, providing a java-tron-up CLI to download, checksum-verify, cache, and install a java-tron wrapper binary (plus cache clean support) with configurable artifact URLs via CLI and root package.json.

Wires the package into the monorepo (TypeScript project refs, yarn.lock, root README package list/dependency graph) and sets ownership in CODEOWNERS/teams.json, plus standard package metadata (license, changelog, typedoc, Jest config/tests).

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

@ulissesferreira ulissesferreira requested a review from a team as a code owner May 15, 2026 11:35
@ulissesferreira
Copy link
Copy Markdown
Contributor Author

Code sync follow-up:

  • Compared the PR package source against @ulissesferreira/java-tron-up@0.1.2.
  • The implementation, CLI, and tests match the latest released source, with only expected MetaMask/core adaptations (@metamask package metadata, Jest test harness, lint/type annotations, ts-bridge build config).
  • Verified in MetaMask/core: yarn workspace @metamask/java-tron-up run test and yarn workspace @metamask/java-tron-up run build both completed successfully.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

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.

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 501f3e3. Configure here.

}

process.exit(result.status ?? 0);
`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Generated wrapper uses CJS in extensionless file

Medium Severity

The installJavaTronBinary function generates an extensionless wrapper script at node_modules/.bin/java-tron that uses CJS-only constructs (require() and __dirname). Node.js determines the module system for extensionless files based on the nearest parent package.json's "type" field. In consuming projects with "type": "module", Node.js v22+ will treat this wrapper as ESM, causing a ReferenceError: require is not defined at runtime. The package's engine range (>=20) includes these affected versions.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 501f3e3. Configure here.

@ulissesferreira
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

1 similar comment
@ulissesferreira
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@ulissesferreira
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions
Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.4.0-preview-73cf60340
@metamask-previews/accounts-controller@38.1.1-preview-73cf60340
@metamask-previews/address-book-controller@7.1.2-preview-73cf60340
@metamask-previews/ai-controllers@0.6.3-preview-73cf60340
@metamask-previews/analytics-controller@1.0.1-preview-73cf60340
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-73cf60340
@metamask-previews/announcement-controller@8.1.0-preview-73cf60340
@metamask-previews/app-metadata-controller@2.0.1-preview-73cf60340
@metamask-previews/approval-controller@9.0.1-preview-73cf60340
@metamask-previews/assets-controller@7.1.2-preview-73cf60340
@metamask-previews/assets-controllers@108.1.0-preview-73cf60340
@metamask-previews/authenticated-user-storage@2.0.0-preview-73cf60340
@metamask-previews/base-controller@9.1.0-preview-73cf60340
@metamask-previews/base-data-service@0.1.3-preview-73cf60340
@metamask-previews/bridge-controller@72.0.4-preview-73cf60340
@metamask-previews/bridge-status-controller@71.1.4-preview-73cf60340
@metamask-previews/build-utils@3.0.4-preview-73cf60340
@metamask-previews/chain-agnostic-permission@1.6.1-preview-73cf60340
@metamask-previews/chomp-api-service@3.1.0-preview-73cf60340
@metamask-previews/claims-controller@0.5.1-preview-73cf60340
@metamask-previews/client-controller@1.0.1-preview-73cf60340
@metamask-previews/compliance-controller@2.0.1-preview-73cf60340
@metamask-previews/composable-controller@12.0.1-preview-73cf60340
@metamask-previews/config-registry-controller@0.3.1-preview-73cf60340
@metamask-previews/connectivity-controller@0.2.0-preview-73cf60340
@metamask-previews/controller-utils@12.1.0-preview-73cf60340
@metamask-previews/core-backend@6.3.0-preview-73cf60340
@metamask-previews/delegation-controller@3.0.0-preview-73cf60340
@metamask-previews/earn-controller@12.1.2-preview-73cf60340
@metamask-previews/eip-5792-middleware@3.0.4-preview-73cf60340
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-73cf60340
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-73cf60340
@metamask-previews/ens-controller@19.1.3-preview-73cf60340
@metamask-previews/eth-block-tracker@15.0.1-preview-73cf60340
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-73cf60340
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-73cf60340
@metamask-previews/foundryup@1.0.1-preview-73cf60340
@metamask-previews/gas-fee-controller@26.2.1-preview-73cf60340
@metamask-previews/gator-permissions-controller@4.1.2-preview-73cf60340
@metamask-previews/geolocation-controller@0.1.3-preview-73cf60340
@metamask-previews/java-tron-up@0.0.0-preview-73cf60340
@metamask-previews/json-rpc-engine@10.5.0-preview-73cf60340
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-73cf60340
@metamask-previews/keyring-controller@25.5.0-preview-73cf60340
@metamask-previews/logging-controller@8.0.2-preview-73cf60340
@metamask-previews/message-manager@14.1.2-preview-73cf60340
@metamask-previews/messenger@1.2.0-preview-73cf60340
@metamask-previews/messenger-cli@0.2.0-preview-73cf60340
@metamask-previews/money-account-balance-service@1.0.2-preview-73cf60340
@metamask-previews/money-account-controller@0.3.0-preview-73cf60340
@metamask-previews/money-account-upgrade-controller@2.0.2-preview-73cf60340
@metamask-previews/multichain-account-service@10.0.0-preview-73cf60340
@metamask-previews/multichain-api-middleware@3.1.2-preview-73cf60340
@metamask-previews/multichain-network-controller@3.1.1-preview-73cf60340
@metamask-previews/multichain-transactions-controller@7.1.0-preview-73cf60340
@metamask-previews/name-controller@9.1.2-preview-73cf60340
@metamask-previews/network-controller@32.0.0-preview-73cf60340
@metamask-previews/network-enablement-controller@5.1.1-preview-73cf60340
@metamask-previews/notification-services-controller@24.1.0-preview-73cf60340
@metamask-previews/passkey-controller@2.0.1-preview-73cf60340
@metamask-previews/permission-controller@13.1.1-preview-73cf60340
@metamask-previews/permission-log-controller@5.1.0-preview-73cf60340
@metamask-previews/perps-controller@6.1.0-preview-73cf60340
@metamask-previews/phishing-controller@17.2.0-preview-73cf60340
@metamask-previews/polling-controller@16.0.5-preview-73cf60340
@metamask-previews/preferences-controller@23.1.0-preview-73cf60340
@metamask-previews/profile-metrics-controller@3.1.4-preview-73cf60340
@metamask-previews/profile-sync-controller@28.1.0-preview-73cf60340
@metamask-previews/ramps-controller@13.3.1-preview-73cf60340
@metamask-previews/rate-limit-controller@7.0.1-preview-73cf60340
@metamask-previews/react-data-query@0.2.1-preview-73cf60340
@metamask-previews/remote-feature-flag-controller@4.2.1-preview-73cf60340
@metamask-previews/sample-controllers@5.0.1-preview-73cf60340
@metamask-previews/seedless-onboarding-controller@9.1.0-preview-73cf60340
@metamask-previews/selected-network-controller@26.1.3-preview-73cf60340
@metamask-previews/shield-controller@5.1.2-preview-73cf60340
@metamask-previews/signature-controller@39.2.2-preview-73cf60340
@metamask-previews/snap-account-service@0.1.0-preview-73cf60340
@metamask-previews/social-controllers@2.2.1-preview-73cf60340
@metamask-previews/storage-service@1.0.1-preview-73cf60340
@metamask-previews/subscription-controller@6.1.3-preview-73cf60340
@metamask-previews/transaction-controller@65.4.0-preview-73cf60340
@metamask-previews/transaction-pay-controller@22.5.0-preview-73cf60340
@metamask-previews/user-operation-controller@41.2.2-preview-73cf60340
@metamask-previews/wallet@0.0.0-preview-73cf60340

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