[PR #948] [MERGED] feat: add unstable_io shim for next/cache #974

Closed
opened 2026-05-06 13:11:20 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/948
Author: @Divkix
Created: 4/29/2026
Status: Merged
Merged: 4/29/2026
Merged by: @james-elicx

Base: mainHead: fix/805-unstable-io


📝 Commits (3)

  • 0073ae6 feat: add unstable_io shim for next/cache (#805)
  • 36b13a3 fix: address review feedback for unstable_io shim
  • 1ced530 fix: correct unstable_io comment about deployment targets

📊 Changes

4 files changed (+51 additions, -1 deletions)

View changed files

📝 packages/vinext/src/check.ts (+1 -1)
📝 packages/vinext/src/shims/cache.ts (+26 -0)
📝 packages/vinext/src/shims/next-shims.d.ts (+1 -0)
📝 tests/shims.test.ts (+23 -0)

📄 Description

Fixes #805

Summary

  • Adds unstable_io() export to the next/cache shim
  • Returns a pre-resolved fulfilled thenable matching Next.js's browser/client implementation
  • React's use() hook can unwrap it synchronously without suspending
  • No config gate needed — the guard was removed upstream in next.js#92923

Test plan

  • Added 3 unit tests in tests/shims.test.ts:
    • Verifies unstable_io is exported as a function
    • Verifies it returns a resolved Promise<void>
    • Verifies singleton behavior (same instance on multiple calls)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/948 **Author:** [@Divkix](https://github.com/Divkix) **Created:** 4/29/2026 **Status:** ✅ Merged **Merged:** 4/29/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/805-unstable-io` --- ### 📝 Commits (3) - [`0073ae6`](https://github.com/cloudflare/vinext/commit/0073ae660ef04f13a37de30afc6552b387cf5092) feat: add unstable_io shim for next/cache (#805) - [`36b13a3`](https://github.com/cloudflare/vinext/commit/36b13a3f6961d0eec35bea3a7d024710695c13d9) fix: address review feedback for unstable_io shim - [`1ced530`](https://github.com/cloudflare/vinext/commit/1ced5302cd214298267692ab7057625a2dd9657a) fix: correct unstable_io comment about deployment targets ### 📊 Changes **4 files changed** (+51 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/check.ts` (+1 -1) 📝 `packages/vinext/src/shims/cache.ts` (+26 -0) 📝 `packages/vinext/src/shims/next-shims.d.ts` (+1 -0) 📝 `tests/shims.test.ts` (+23 -0) </details> ### 📄 Description Fixes #805 ## Summary - Adds `unstable_io()` export to the `next/cache` shim - Returns a pre-resolved fulfilled thenable matching Next.js's browser/client implementation - React's `use()` hook can unwrap it synchronously without suspending - No config gate needed — the guard was removed upstream in next.js#92923 ## Test plan - Added 3 unit tests in `tests/shims.test.ts`: - Verifies `unstable_io` is exported as a function - Verifies it returns a resolved `Promise<void>` - Verifies singleton behavior (same instance on multiple calls) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:11:20 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#974
No description provided.