Skip to content

Add pulumi, d2, jj, and nx tool definitions - #1166

Open
EliSchleifer wants to merge 1 commit into
mainfrom
add-pulumi-d2-jj-nx-tools
Open

Add pulumi, d2, jj, and nx tool definitions#1166
EliSchleifer wants to merge 1 commit into
mainfrom
add-pulumi-d2-jj-nx-tools

Conversation

@EliSchleifer

Copy link
Copy Markdown
Member

Summary

Adds four tool definitions that trunk-cloud currently carries as custom downloads +
tools.definitions blocks in its own .trunk/trunk.yaml, because none of them exist in this
plugin source. Upstreaming them removes ~60 lines of local config per consuming repo.

  • tools/pulumi — Pulumi CLI (IaC). Unix tarballs hold pulumi/<binary> (one level to
    strip); the Windows zip nests one level deeper (pulumi/bin/pulumi.exe), so it gets its own
    download entry with strip_components: 2. Stripping to the tool root keeps the CLI's bundled
    pulumi-language-* / pulumi-resource-* plugins adjacent to the binary, which it requires.
  • tools/d2D2 declarative diagram language. Every platform ships a
    .tar.gz (Windows included; the .msi is skipped). Follows the gh pattern — strip_components: 1
    plus ${tool}/bin on PATH — rather than stripping two levels, so the bundled LICENSE/man
    files survive.
  • tools/jjJujutsu VCS. Note the asset naming is
    ${cpu}-${os} (a target triple), the reverse of most tools here, and there is no
    strip_components: the archives hold jj at their root alongside README/LICENSE.
    Windows ships .zip instead of .tar.gz, so it needs a separate entry.
  • tools/nxNx monorepo task runner, a plain runtime: node package.

Note on the jj health check

jj --version prints jj 0.45.1-<commit sha>. ${semver} parses the sha as a prerelease suffix,
so the health check fails with Expected '0.45.1' but got '0.45.1-7c41cdeb...'. The definition
uses an explicit jj (\d+\.\d+\.\d+) to capture only the x.y.z prefix; there's a comment in the
file so a future editor doesn't "simplify" it back to ${semver}.

Test plan

Each tool uses a health_checks entry + toolInstallTest, per the guidance in
repo-tools/tool-test-helper/tool_sample.test.ts.

  • npm test tools/pulumi tools/d2 tools/jj tools/nx — 4 suites passed, 4 tests passed
  • trunk tools install verified against each known_good_version (pulumi 3.210.0, d2 0.7.1,
    jj 0.45.1, nx 22.5.3) in a sandbox repo using plugins: sources: local:
  • Verified again against each tool's latest release resolved by trunk tools enable
    (d2 0.8.2, nx 23.2.0), so the definitions aren't pinned-version-specific
  • Ran each shim: d2 --version, jj --version, nx --version, pulumi version
  • trunk fmt + trunk check clean on the new files
  • Windows and macOS paths are unverified — no runner available locally. All four URL patterns
    and archive layouts were confirmed against the published release assets, and the Windows
    differences (pulumi's deeper zip nesting, jj's .zip extension) are handled explicitly.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Sep 4, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@trunk-io

trunk-io Bot commented Sep 4, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant