Skip to content

fix: adjust badge api caching strategy - #1246

Merged
danielroe merged 1 commit into
npmx-dev:mainfrom
btea:fix/adjust-badge-caching-strategy
Feb 9, 2026
Merged

fix: adjust badge api caching strategy#1246
danielroe merged 1 commit into
npmx-dev:mainfrom
btea:fix/adjust-badge-caching-strategy

Conversation

@btea

@bteabtea commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Currently, modifying the query parameters in the badge API will not update the returned content.

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentFeb 9, 2026 0:05am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewFeb 9, 2026 0:05am
npmx-lunariaIgnoredIgnoredFeb 9, 2026 0:05am

Request Review

@codecov

codecovBot commented Feb 9, 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!

@coderabbitai

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The pull request modifies nuxt.config.ts to introduce a new ISR (Incremental Static Regeneration) route rule for API badge endpoints. Under the routeRules configuration, a new entry for '/api/registry/badge/\\' is added with specific caching parameters. The rule sets an expiration time of 3600 seconds, enables query parameter pass-through, and restricts allowed query parameters to colour, labelColour, label, and name. This extends the existing ISR configuration to provide controlled caching behaviour for badge generation endpoints.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check nameStatusExplanation
Description check✅ PassedThe PR description directly relates to the changeset, explaining the caching issue being fixed.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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

@danielroe
danielroe added this pull request to the merge queueFeb 9, 2026
Merged via the queue into npmx-dev:main with commit 6b33775Feb 9, 2026
17 checks passed
@btea
btea deleted the fix/adjust-badge-caching-strategy branch February 9, 2026 00:24
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.

2 participants

@btea@danielroe