Skip to content

Comments

fix: add style to allowQuery in badge API route#1576

Merged
danielroe merged 1 commit intonpmx-dev:mainfrom
wojtekmaj:fix-allow-query
Feb 22, 2026
Merged

fix: add style to allowQuery in badge API route#1576
danielroe merged 1 commit intonpmx-dev:mainfrom
wojtekmaj:fix-allow-query

Conversation

@wojtekmaj
Copy link
Contributor

Follow-up after #1487

Copilot AI review requested due to automatic review settings February 22, 2026 15:04
@vercel
Copy link

vercel bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 22, 2026 3:06pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 22, 2026 3:06pm
npmx-lunaria Ignored Ignored Feb 22, 2026 3:06pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR is a follow-up fix to PR #1487 that adds the style query parameter to the ISR (Incremental Static Regeneration) configuration for the badge API route. PR #1487 introduced a new optional style parameter that allows users to choose between the default badge style and a shields.io-style badge appearance, but the ISR configuration was not updated to include this parameter in the allowed query list, which would prevent proper caching behavior.

Changes:

  • Added 'style' to the allowQuery array in the ISR configuration for /api/registry/badge/** route

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 22, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This PR expands the ISR query-allow list for the /api/registry/badge/** route by adding 'style' to the existing parameter set of ['color', 'labelColor', 'label', 'name']. The modification in nuxt.config.ts updates which query parameters are permitted to influence incremental static regeneration behaviour for this specific route.

Possibly related PRs

Suggested reviewers

  • danielroe
  • ghostdevv
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description references a previous pull request (#1487) and is directly related to the changeset, which adds 'style' to the allowQuery list in the badge API route.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe danielroe added this pull request to the merge queue Feb 22, 2026
Merged via the queue into npmx-dev:main with commit 6b3d50c Feb 22, 2026
21 checks passed
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.

2 participants