bun-canary: Update to version 1.3.12-canary.1+0ff0065f9, fix checkver & autoupdate#2793
bun-canary: Update to version 1.3.12-canary.1+0ff0065f9, fix checkver & autoupdate#2793
Conversation
WalkthroughWindows Bun canary manifest switched downloads from nightly.link to GitHub release assets, added arm64 support, added AVX2 CPU probing to pick x64 vs x64-baseline, migrated legacy Changes
Sequence Diagram(s)sequenceDiagram
participant Installer
participant CPU as CPU Probe
participant FS as Filesystem ($persist_dir)
participant GitHub as GitHub Releases
Installer->>FS: check if $persist_dir exists (migrate ~\.bun if absent)
Installer->>CPU: probe AVX2 on x64
alt arm64
Installer->>GitHub: download bun-windows-aarch64.zip
else x64 + AVX2
Installer->>GitHub: download bun-windows-x64.zip
else x64 without AVX2
Installer->>GitHub: download bun-windows-x64-baseline.zip
end
GitHub-->>Installer: provide ZIP asset
Installer->>FS: extract selected bun.exe into $dir and move to $persist_dir\bin
Installer->>FS: remove other bun-windows-* artifacts
Installer->>FS: update global PATH via installer.script
Installer->>GitHub: (checkver) download x64 ZIP, extract and run bun.exe --revision
GitHub-->>Installer: return revision string for autoupdate
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Your changes did not pass all checks. Please address the issues in the manifest and comment starting with bun-canary
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bucket/bun-canary.json`:
- Around line 15-22: The manifest contains stale checksum values: update the
three "hash" entries shown (the two-element "hash" array and the "arm64"
object's "hash") by downloading the current canary release artifacts and
regenerating their SHA256 sums, then replace the old hash strings in
bun-canary.json; additionally verify that the second element of the "hash" array
matches the revision embedded in the downloaded binary to ensure the manifest
points to the correct canary build.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fe7da723-be73-4618-a2b2-e284603f3819
📒 Files selected for processing (1)
bucket/bun-canary.json
|
/verify |
|
All changes look good. Wait for review from human collaborators. bun-canary
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bucket/bun-canary.json (1)
74-86: Checkver script works but lacks error handling.The approach of downloading and running
bun.exe --revisionis valid since canary versions aren't predictable from tags alone. However, ifInvoke-WebRequestorExpand-Archivefails, temporary files may remain in the cache directory.Consider wrapping in try/finally for cleanup, though this is minor for a checkver script.
♻️ Optional: Add error handling
"checkver": { "script": [ "$dl_url = 'https://github.com/oven-sh/bun/releases/download/canary/bun-windows-x64.zip'", "$dl_path = cache_path 'bun-canary' 'unknown' $dl_url", "$dl_dir = Split-Path -Path $dl_path -Parent", - "Invoke-WebRequest -Uri $dl_url -OutFile $dl_path", - "Expand-Archive -Path $dl_path -DestinationPath $dl_dir | Out-Null", - "$ver = & \"$dl_dir\\bun-windows-x64\\bun.exe\" --revision", - "Remove-Item -Path $dl_path, $dl_dir\\bun-windows-x64 -Recurse -Force", - "Write-Output $ver" + "try {", + " Invoke-WebRequest -Uri $dl_url -OutFile $dl_path", + " Expand-Archive -Path $dl_path -DestinationPath $dl_dir | Out-Null", + " $ver = & \"$dl_dir\\bun-windows-x64\\bun.exe\" --revision", + " Write-Output $ver", + "} finally {", + " Remove-Item -Path $dl_path, $dl_dir\\bun-windows-x64 -Recurse -Force -ErrorAction SilentlyContinue", + "}" ],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@bucket/bun-canary.json` around lines 74 - 86, The checkver script currently downloads and expands bun and then reads its revision, but lacks error handling and may leave cached files if Invoke-WebRequest or Expand-Archive fail; update the "checkver" script to wrap the download, expansion, execution of "$dl_dir\\bun-windows-x64\\bun.exe --revision", and the cleanup Remove-Item calls in a try/finally block (or equivalent error-handling construct) so that the Remove-Item cleanup runs regardless of failures, and ensure any caught errors are re-thrown or surfaced so the check fails correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@bucket/bun-canary.json`:
- Around line 74-86: The checkver script currently downloads and expands bun and
then reads its revision, but lacks error handling and may leave cached files if
Invoke-WebRequest or Expand-Archive fail; update the "checkver" script to wrap
the download, expansion, execution of "$dl_dir\\bun-windows-x64\\bun.exe
--revision", and the cleanup Remove-Item calls in a try/finally block (or
equivalent error-handling construct) so that the Remove-Item cleanup runs
regardless of failures, and ensure any caught errors are re-thrown or surfaced
so the check fails correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f4bb395c-ef75-49bf-9701-ff2f0b1d519f
📒 Files selected for processing (1)
bucket/bun-canary.json
Migrate:
Unable to use semantic versioning, cannot guarantee that version numbers will strictly increase.
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit
New Features
Chores