Skip to content

Comments

feat(badges): Display npm version and downloads badges by default#20

Merged
ioncakephper merged 1 commit intomainfrom
chose/remove-console
Nov 8, 2025
Merged

feat(badges): Display npm version and downloads badges by default#20
ioncakephper merged 1 commit intomainfrom
chose/remove-console

Conversation

@ioncakephper
Copy link
Owner

The README.md has been updated to include npm version and npm downloads badges in the main section by default. This was achieved by removing them from the excludeBadges option in the doc-gen configuration.

To maintain a concise initial view, the stars and forks badges have been moved into the collapsed 'More badges' section.

Additionally, a debugging console.log statement for excludeBadges was removed from index.js, and a trailing space was added to the badge output in index.js when badges are not collapsed, ensuring better markdown formatting.

The `README.md` has been updated to include `npm version` and `npm downloads` badges in the main section by default. This was achieved by removing them from the `excludeBadges` option in the `doc-gen` configuration.

To maintain a concise initial view, the `stars` and `forks` badges have been moved into the collapsed 'More badges' section.

Additionally, a debugging `console.log` statement for `excludeBadges` was removed from `index.js`, and a trailing space was added to the badge output in `index.js` when badges are not collapsed, ensuring better markdown formatting.
@gemini-code-assist
Copy link

Summary of Changes

Hello @ioncakephper, 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 refines the presentation of project badges in the README by making critical 'npm version' and 'npm downloads' badges immediately visible. To balance information density, 'stars' and 'forks' badges have been moved into a collapsible section. Additionally, the change includes minor code improvements such as removing a debugging statement and adjusting markdown output for better formatting.

Highlights

  • Badge Visibility: The 'npm version' and 'npm downloads' badges are now displayed by default in the README.md, enhancing immediate visibility of key project metrics.
  • README Organization: The 'stars' and 'forks' badges have been relocated to the collapsed 'More badges' section in the README.md to maintain a concise initial view.
  • Code Cleanup: A debugging 'console.log' statement related to 'excludeBadges' has been removed from 'index.js'.
  • Markdown Formatting: A trailing space is now added to the badge output in 'index.js' when badges are not collapsed, ensuring better markdown rendering.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. 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

  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.

@ioncakephper ioncakephper merged commit 0712603 into main Nov 8, 2025
6 checks passed
@ioncakephper ioncakephper deleted the chose/remove-console branch November 8, 2025 14:55
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 updates the default badge display to include npm version and download counts, moving the stars and forks badges to a collapsed section to maintain a clean README. It also removes a debugging console.log and adds a trailing space for better markdown formatting of badges. My review identifies a minor edge case with the new formatting logic and provides a suggestion to make it more robust.

// If collapse not requested or nothing hidden, return all inline, with a trailing space
if (!collapse || hidden.length === 0) {
return allBadges.map((b) => b.md).join(" ");
return allBadges.map((b) => b.md).join(" ") + " ";

Choose a reason for hiding this comment

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

medium

While adding a trailing space for better markdown formatting is a good idea, the current implementation has a small side effect. If allBadges is empty (for example, if a user excludes all badges), this line will return a single space " " instead of an empty string. This can result in unnecessary whitespace in the output.

A check to ensure badges exist before adding the trailing space would make this more robust.

Suggested change
return allBadges.map((b) => b.md).join(" ") + " ";
return allBadges.length > 0 ? allBadges.map((b) => b.md).join(" ") + " " : "";

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