Skip to content

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

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

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

Conversation

@wojtekmaj

Copy link
Copy Markdown
Contributor

Follow-up after #1487

CopilotAI review requested due to automatic review settings February 22, 2026 15:04
@vercel

vercelBot commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentFeb 22, 2026 3:06pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewFeb 22, 2026 3:06pm
npmx-lunariaIgnoredIgnoredFeb 22, 2026 3:06pm

Request Review

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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 nameStatusExplanation
Description check✅ PassedThe 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

codecovBot commented Feb 22, 2026

Copy link
Copy Markdown

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 queueFeb 22, 2026
Merged via the queue into npmx-dev:main with commit 6b3d50cFeb 22, 2026
21 checks passed
alex-key pushed a commit to alex-key/npmx.dev that referenced this pull request Feb 25, 2026
Sign up for freeto 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.

3 participants

@wojtekmaj@danielroe