fix(hooks): use versioned bunx to avoid cache issues#67
Conversation
Add code-runner.ts wrapper that reads version from release-please manifest and runs bunx with exact version to prevent stale cache
Summary of ChangesHello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request aims to enhance the reliability and reproducibility of pre-commit hooks by ensuring that the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a wrapper script, code-runner.ts, to ensure that bunx uses a specific, versioned @pleaseai/code package, preventing potential cache-related issues. The version is dynamically read from the .release-please-manifest.json file. The hooks in hooks.json are updated to use this new runner. This is a good approach for ensuring reproducible builds for the hooks. My review includes a suggestion to make the new code-runner.ts script more robust by adding validation for the package version and improved error handling for the spawn process.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
=======================================
Coverage 39.35% 39.35%
=======================================
Files 59 59
Lines 6489 6489
=======================================
Hits 2554 2554
Misses 3935 3935 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add version validation and spawn error handling to code-runner.ts
Summary
Test plan