Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v03 #1411 +/- ##
==========================================
- Coverage 90.66% 90.21% -0.46%
==========================================
Files 82 86 +4
Lines 16698 17808 +1110
==========================================
+ Hits 15140 16066 +926
- Misses 1558 1742 +184 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.44% (22.6 MiB → 22.7 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
0166c8c to
582a2cb
Compare
|
This looks really good. I went through all the code in one go without any confusion! I’ll take a closer look tomorrow, thank you! |
|
|
||
| /// List all versions of Bun available on GitHub releases. | ||
| async fn list_remote_versions(&self) -> Result<Vec<BunVersion>> { | ||
| let url = "https://api.github.com/repos/oven-sh/bun/releases?per_page=100"; |
There was a problem hiding this comment.
I might want to pull the GitHub token from the GH_TOKEN or GITHUB_TOKEN env vars (and document it in configuration.md) so we can avoid hitting the API rate limit.
There was a problem hiding this comment.
Now respects GITHUB_TOKEN (automatically set in GitHub actions) for authentication if set.
I did not yet implement support for GH_TOKEN, which is set by the GitHub CLI:
- The
prekCLI looks like it only usesGITHUB_TOKENso far - This codepath should not run so frequently in real-world use to trigger the rate limit; this is primarily a CI concern
Happy to change if you feel otherwise :)
There was a problem hiding this comment.
For someone like me living in a country with heavy internet censorship, I have to use a proxy to access GitHub. That means I’m sharing the same busy IP with tons of other people, so hitting the GitHub API rate limit is basically an everyday thing :(
There was a problem hiding this comment.
That's a great point -- and sorry for the situation :(
To be clear though, I did add support for GITHUB_TOKEN in f05643f. I'm not sure if I see how supporting GH_TOKEN as well may be different than just supporting GITHUB_TOKEN. Since this isn't being called by the gh CLI in anyway, the user still needs to manually set the environment variable (in e.g. ~/.zshrc). Am I missing something?
Happy again to add GH_TOKEN support as well if you'd prefer it; just want to make sure I fully understand the impact of supporting it.
582a2cb to
d1b97ca
Compare
Add three integration tests covering the key functionality: - basic_bun: simple hook execution using bun -e - additional_dependencies: verify deps installed via bunx cowsay - language_version: test version specification with language_version: "1" The additional_dependencies test runs twice to verify health_check and cache reuse works correctly.
- Add Bun to toolchain list in README features section - Add Bun to managed toolchain downloads list in languages.md - Add full Bun language section with version format documentation
d1b97ca to
223114a
Compare
When listing Bun versions from GitHub releases, use the GITHUB_TOKEN environment variable if available to authenticate requests. This increases the rate limit from 60 to 5,000 requests/hour. GITHUB_TOKEN is automatically set in GitHub Actions workflows.
Bun installs global packages to $BUN_INSTALL/bin/ on all platforms, so bin_dir should always return prefix/bin. The Windows special case was incorrectly copied from Node (which uses npm's different install structure).
0a5fd90 to
467f1a5
Compare
467f1a5 to
ec9c1e6
Compare
|
Thanks! |
* feat(bun): add Bun language support * test(bun): add integration tests for Bun language support Add three integration tests covering the key functionality: - basic_bun: simple hook execution using bun -e - additional_dependencies: verify deps installed via bunx cowsay - language_version: test version specification with language_version: "1" The additional_dependencies test runs twice to verify health_check and cache reuse works correctly. * docs: add Bun to supported languages documentation - Add Bun to toolchain list in README features section - Add Bun to managed toolchain downloads list in languages.md - Add full Bun language section with version format documentation * ci: add Bun setup to test jobs * feat(bun): use GITHUB_TOKEN to avoid API rate limits When listing Bun versions from GitHub releases, use the GITHUB_TOKEN environment variable if available to authenticate requests. This increases the rate limit from 60 to 5,000 requests/hour. GITHUB_TOKEN is automatically set in GitHub Actions workflows. * fix(bun): use consistent bin_dir path on all platforms Bun installs global packages to $BUN_INSTALL/bin/ on all platforms, so bin_dir should always return prefix/bin. The Windows special case was incorrectly copied from Node (which uses npm's different install structure). * Add toolchain download test * Add tests --------- Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
* feat(bun): add Bun language support * test(bun): add integration tests for Bun language support Add three integration tests covering the key functionality: - basic_bun: simple hook execution using bun -e - additional_dependencies: verify deps installed via bunx cowsay - language_version: test version specification with language_version: "1" The additional_dependencies test runs twice to verify health_check and cache reuse works correctly. * docs: add Bun to supported languages documentation - Add Bun to toolchain list in README features section - Add Bun to managed toolchain downloads list in languages.md - Add full Bun language section with version format documentation * ci: add Bun setup to test jobs * feat(bun): use GITHUB_TOKEN to avoid API rate limits When listing Bun versions from GitHub releases, use the GITHUB_TOKEN environment variable if available to authenticate requests. This increases the rate limit from 60 to 5,000 requests/hour. GITHUB_TOKEN is automatically set in GitHub Actions workflows. * fix(bun): use consistent bin_dir path on all platforms Bun installs global packages to $BUN_INSTALL/bin/ on all platforms, so bin_dir should always return prefix/bin. The Windows special case was incorrectly copied from Node (which uses npm's different install structure). * Add toolchain download test * Add tests --------- Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
Adds
language: bunsupport for running hooks with the Bun JavaScript runtime.Mirrors the Node.js implementation:
bun@1.x,>=1.0, <2.0, pathsBUN_INSTALLredirectionbun install -gfor additional dependenciesRef #619 (keeping issue open since this PR doesn't implement
denosupport)