Add pulumi, d2, jj, and nx tool definitions - #1166
Open
EliSchleifer wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Merging to
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four tool definitions that trunk-cloud currently carries as custom
downloads+tools.definitionsblocks in its own.trunk/trunk.yaml, because none of them exist in thisplugin source. Upstreaming them removes ~60 lines of local config per consuming repo.
tools/pulumi— Pulumi CLI (IaC). Unix tarballs holdpulumi/<binary>(one level tostrip); the Windows zip nests one level deeper (
pulumi/bin/pulumi.exe), so it gets its owndownload entry with
strip_components: 2. Stripping to the tool root keeps the CLI's bundledpulumi-language-*/pulumi-resource-*plugins adjacent to the binary, which it requires.tools/d2— D2 declarative diagram language. Every platform ships a.tar.gz(Windows included; the.msiis skipped). Follows theghpattern —strip_components: 1plus
${tool}/binonPATH— rather than stripping two levels, so the bundledLICENSE/manfiles survive.
tools/jj— Jujutsu VCS. Note the asset naming is${cpu}-${os}(a target triple), the reverse of most tools here, and there is nostrip_components: the archives holdjjat their root alongsideREADME/LICENSE.Windows ships
.zipinstead of.tar.gz, so it needs a separate entry.tools/nx— Nx monorepo task runner, a plainruntime: nodepackage.Note on the
jjhealth checkjj --versionprintsjj 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 definitionuses an explicit
jj (\d+\.\d+\.\d+)to capture only thex.y.zprefix; there's a comment in thefile so a future editor doesn't "simplify" it back to
${semver}.Test plan
Each tool uses a
health_checksentry +toolInstallTest, per the guidance inrepo-tools/tool-test-helper/tool_sample.test.ts.npm test tools/pulumi tools/d2 tools/jj tools/nx— 4 suites passed, 4 tests passedtrunk tools installverified against eachknown_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:trunk tools enable(d2 0.8.2, nx 23.2.0), so the definitions aren't pinned-version-specific
d2 --version,jj --version,nx --version,pulumi versiontrunk fmt+trunk checkclean on the new filesand archive layouts were confirmed against the published release assets, and the Windows
differences (pulumi's deeper zip nesting, jj's
.zipextension) are handled explicitly.🤖 Generated with Claude Code