Skip to content

feat(i18n): change default cache for /lunaria/status.json#1465

Merged
danielroe merged 1 commit intonpmx-dev:mainfrom
userquin:feat-lunaria-status-json-cache-headers
Feb 13, 2026
Merged

feat(i18n): change default cache for /lunaria/status.json#1465
danielroe merged 1 commit intonpmx-dev:mainfrom
userquin:feat-lunaria-status-json-cache-headers

Conversation

@userquin
Copy link
Member

@userquin userquin commented Feb 13, 2026

We need to avoid default Vercel cache headers for json files: public, max-age=86400, immutable, this PR changes the cache control to public, max-age=0, must-revalidate to allow get a fresh status.json file on every i18n deployment change.

Since Vercel will send last-modified, using useFech will receive a 200 when updated and a 304 (not modified) when not changed and once at browser cache.

/lunaria/status.json not being updated without disabling cache at devtools
image

/lunaria/status.json with this PR and once in browser cache
image

@vercel
Copy link

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

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

A new route rule has been added to the Nuxt configuration for the path /lunaria/status.json. The route rule specifies Cache-Control response headers with the values public, max-age=0, must-revalidate. This configuration ensures that responses for this endpoint are marked as publicly cacheable but with a maximum age of zero seconds, requiring revalidation before each use. The change adds six lines to nuxt.config.ts.

🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (8 files):

⚔️ i18n/locales/es.json (content)
⚔️ i18n/locales/zh-CN.json (content)
⚔️ lunaria/files/es-419.json (content)
⚔️ lunaria/files/es-ES.json (content)
⚔️ lunaria/files/zh-CN.json (content)
⚔️ nuxt.config.ts (content)
⚔️ server/utils/readme.ts (content)
⚔️ test/unit/server/utils/readme.spec.ts (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the cache control changes for /lunaria/status.json and their purpose for i18n deployments.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch feat-lunaria-status-json-cache-headers
  • Post resolved changes as copyable diffs in a comment

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

@codecov
Copy link

codecov bot commented Feb 13, 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 13, 2026
Merged via the queue into npmx-dev:main with commit cb1b4a4 Feb 13, 2026
22 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