Conversation
Applied @willbooster/wbfy v19.1.3.
Summary of ChangesHello, 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 performs a maintenance update to standardize tooling and documentation across the repository. It centralizes lockfile normalization logic, refines AI agent behavior guidelines to ensure clearer documentation, and updates critical build dependencies to maintain project health. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 the 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 counterproductive. 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. The versions climb higher today, / With lockfiles now kept in their way. / The scripts are all clean, / The code is now seen, / In the final and finished display. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request extracts the inline bun.lock normalization logic from lefthook.yml into a dedicated shell script (.lefthook/normalize-bun-lockfile.sh), integrates it into the prepare lifecycle script in package.json, updates several project dependencies, and adds a documentation rule regarding explanatory text. Feedback on the new shell script suggests placing temporary files in the .tmp directory to comply with repository rules and simplifying the file-writing logic to eliminate redundant copy operations.
| normalized="" | ||
| trap '[[ -z "$normalized" ]] || rm -f "$normalized"' EXIT | ||
| for file in "$@"; do | ||
| [[ -f "$file" ]] || continue | ||
| normalized="$(mktemp "$file.wbfy-normalizing.XXXXXX")" | ||
| cp -p "$file" "$normalized" | ||
| sed -E 's#(", )"https://npm\.flatt\.tech/[^"]*"#\1""#g' "$file" > "$normalized" | ||
| if ! cmp -s "$file" "$normalized"; then | ||
| mv "$normalized" "$file" | ||
| echo "Removed Takumi Guard proxy URLs from $file so the lockfile stays registry-agnostic." | ||
| fi | ||
| rm -f "$normalized" | ||
| normalized="" |
There was a problem hiding this comment.
Improvement Opportunity: Temporary File Location & Permissions Preservation
- Temporary File Location: According to the repository rules, temporary files should be placed in
.tmprather than the repository root. Creating them in the repository root can pollute the working directory and trigger file watchers. - Redundant Copy & Permissions Preservation: The
cp -pon line 13 is redundant because the subsequentsedredirection (> "$normalized") overwrites the file. Instead of copying and moving, we can write thesedoutput to a temp file in.tmpand then usecat "$normalized" > "$file"to update the original file. This preserves the original file's permissions, ownership, and inode without needingcp -pormv.
| normalized="" | |
| trap '[[ -z "$normalized" ]] || rm -f "$normalized"' EXIT | |
| for file in "$@"; do | |
| [[ -f "$file" ]] || continue | |
| normalized="$(mktemp "$file.wbfy-normalizing.XXXXXX")" | |
| cp -p "$file" "$normalized" | |
| sed -E 's#(", )"https://npm\.flatt\.tech/[^"]*"#\1""#g' "$file" > "$normalized" | |
| if ! cmp -s "$file" "$normalized"; then | |
| mv "$normalized" "$file" | |
| echo "Removed Takumi Guard proxy URLs from $file so the lockfile stays registry-agnostic." | |
| fi | |
| rm -f "$normalized" | |
| normalized="" | |
| mkdir -p .tmp | |
| normalized="" | |
| trap '[[ -z "$normalized" ]] || rm -f "$normalized"' EXIT | |
| for file in "$@"; do | |
| [[ -f "$file" ]] || continue | |
| normalized="$(mktemp .tmp/wbfy-normalizing.XXXXXX)" | |
| sed -E 's#(", )"https://npm\.flatt\.tech/[^"]*"#\1""#g' "$file" > "$normalized" | |
| if ! cmp -s "$file" "$normalized"; then | |
| cat "$normalized" > "$file" | |
| echo "Removed Takumi Guard proxy URLs from $file so the lockfile stays registry-agnostic." | |
| fi | |
| rm -f "$normalized" | |
| normalized="" | |
| done |
References
- Simplify code as much as possible to eliminate redundancy. (link)
No description provided.