Skip to content

Conversation

mcansh
Copy link
Owner

@mcansh mcansh commented Aug 4, 2025

No description provided.

…onfiguration files

Signed-off-by: GitHub <noreply@github.com>
Copy link

changeset-bot bot commented Aug 4, 2025

⚠️ No Changeset found

Latest commit: f496d6b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

cloudflare-workers-and-pages bot commented Aug 4, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
packages f496d6b Commit Preview URL

Branch Preview URL
Aug 05 2025, 10:18 PM

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @mcansh, 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 PR introduces a new Vite plugin designed to automatically remove specified HTML attributes from JSX/TSX files during the build process. Its primary purpose is to help optimize production bundles by stripping out development-only attributes like data-testid, ensuring cleaner and potentially smaller client-side code.

Highlights

  • New Vite Plugin: I've added @mcansh/vite-plugin-attributes, a new Vite plugin to the monorepo.
  • Attribute Removal: This plugin automatically removes specified HTML attributes from .tsx and .jsx files during the build process.
  • Configurable Attributes: While it defaults to removing data-testid attributes, users can configure an array of custom attributes to be removed.
  • Production Optimization: The plugin is enabled by default only in production environments, ensuring development attributes are present during development but stripped for deployment.
  • Efficient Transformation: The transformation logic uses magic-string for efficient and accurate source code manipulation, preserving source maps.
  • Comprehensive Testing: The core attribute removal logic is thoroughly tested using Vitest, covering various scenarios including default and custom attribute removal.
Using Gemini Code Assist

The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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 or fill out our survey to provide feedback.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.05%. Comparing base (6d0ddbe) to head (f496d6b).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #58      +/-   ##
==========================================
+ Coverage   93.80%   94.05%   +0.24%     
==========================================
  Files          19       20       +1     
  Lines         872      908      +36     
  Branches      215      221       +6     
==========================================
+ Hits          818      854      +36     
  Misses         54       54              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Vite plugin, vite-plugin-attributes, to remove specified attributes from code, which is a great addition. The implementation is solid, but I've identified a critical bug in the core logic that could lead to code corruption, as well as a configuration issue in package.json that prevents tests from running correctly. My review includes suggestions to fix these issues and improve the code's robustness and readability.

mcansh added 4 commits August 4, 2025 21:26
Signed-off-by: GitHub <noreply@github.com>
…tMeta' for consistency

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Copy link

pkg-pr-new bot commented Aug 4, 2025

More templates

npm i https://pkg.pr.new/mcansh/packages/@mcansh/http-helmet@58
npm i https://pkg.pr.new/mcansh/packages/@mcansh/url@58
npm i https://pkg.pr.new/mcansh/packages/@mcansh/vite-plugin-attributes@58
npm i https://pkg.pr.new/mcansh/packages/@mcansh/vitest-response-matchers@58

commit: f496d6b

mcansh added 5 commits August 4, 2025 21:44
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
…overrides

Signed-off-by: GitHub <noreply@github.com>
@mcansh mcansh changed the base branch from main to dev August 5, 2025 20:02
mcansh added 4 commits August 5, 2025 20:52
…-dom

Signed-off-by: GitHub <noreply@github.com>
…age instructions

Signed-off-by: GitHub <noreply@github.com>
…nd language support

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant