Skip to content

fix(cache): load storage drivers through file URLs - #992

Merged
harlan-zw merged 2 commits into
1.xfrom
fix/cache-driver-file-url-1x
Nov 25, 2026
Merged

harlan-zw merged 2 commits into
1.xfrom
fix/cache-driver-file-url-1x

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Refs #991

📚 Description

On Windows, Node rejects the absolute cache driver path that Nitro imports. This backports #971 to 1.x.

Nitro loads the default driver from a file URL. The server bundler resolves that URL to the local file. Application-defined cache mounts take precedence.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

Node rejects Windows drive-letter paths when Nitro imports the default cache driver during setup. Backport the file URL and bundling alias from #971 to 1.x.
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
scripts-playground Error Error Nov 25, 2026 5:02am UTC

Request Review

@harlan-zw

harlan-zw commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

🟣 Merged · 1 follow-up not fixed

  • 55 Windows checks miss a missing Scripts cache mount · cache-driver-dev.test.ts:13
    If the module stops registering nuxt-scripts-cache, /api/nitro-runtime still returns the expected response through Nitro’s default cache. The Windows production check uses the same endpoint, so both checks can pass with the dedicated bounded mount missing.
    Fix: Assert the dedicated mount’s eviction behavior in both Windows end-to-end checks.

2026-11-25 05:29 UTC · Harlan Agent Kit automated review, not Harlan's · AI policy

@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@992

commit: 8013aaa

@harlan-zw harlan-zw added the harlan-agent-blocked The automated Review found a material defect in this head commit. label Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The cache setup now configures the driver with a file URL and adds an alias to the local driver path. It preserves an existing cache mount. Unit and end-to-end tests cover driver loading, alias resolution, and runtime responses. A Windows CI job runs the related checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: Minimal · up to 8013a

This change loads the cache storage driver through a file URL so Windows no longer rejects the absolute path. No concrete merge-blocking risk was identified in the supplied evidence. The Windows CI result should be confirmed before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: cache storage drivers are now loaded through file URLs, which matches the cache-config.ts and cached-upstream lifecycle test changes. It follows conventional commit fo…
Description check Passed The description states the Windows problem (Node rejects the absolute cache driver path), the backport of #971 to 1.x, the file URL approach, and the precedence of application cache mounts. These matc…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: cache storage drivers are now loaded through file URLs, which matches the cache-config.ts and cached-upstream lifecycle test changes. It follows conventional commit form and is specific.

Full details: Description check

Explanation

The description states the Windows problem (Node rejects the absolute cache driver path), the backport of #971 to 1.x, the file URL approach, and the precedence of application cache mounts. These match the changeset. The template comments and AI disclosure are present but do not make the description off-topic.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8f8e1cc2-5d2b-4cbe-8930-bb525d267ba5
Commits

Reviewing files that changed from the base of the PR and between 4582568 and 8013aaa.

Files selected for processing: 1

  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

The module builder reads the root TypeScript config, which extends the generated Nuxt config.
@harlan-zw harlan-zw added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. labels Nov 25, 2026
@harlan-zw
harlan-zw merged commit 3da6b0e into 1.x Nov 25, 2026
18 of 19 checks passed
@harlan-zw
harlan-zw deleted the fix/cache-driver-file-url-1x branch November 25, 2026 05:17
@harlan-zw harlan-zw mentioned this pull request Nov 25, 2026
@harlan-zw harlan-zw removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Nov 25, 2026

This branch had an error being deployed

1 failed deployment
Preview — 8013aaab Deployed Nov 25, 2026 by vercel[bot]
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.

1 participant