Skip to content

Comments

fix: adjust badge api caching strategy#1246

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

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

Conversation

@btea
Copy link
Contributor

@btea btea commented Feb 9, 2026

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

@vercel
Copy link

vercel bot commented Feb 9, 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 9, 2026 0:05am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 9, 2026 0:05am
npmx-lunaria Ignored Ignored Feb 9, 2026 0:05am

Request Review

@codecov
Copy link

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

📝 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 name Status Explanation
Description check ✅ Passed The 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 queue Feb 9, 2026
Merged via the queue into npmx-dev:main with commit 6b33775 Feb 9, 2026
17 checks passed
@btea btea deleted the fix/adjust-badge-caching-strategy branch February 9, 2026 00:24
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