mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #435] [MERGED] perf: async I/O + cache for og-inline-fetch-assets transform #573
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#573
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/435
Author: @Divkix
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @james-elicx
Base:
main← Head:perf/og-inliner-async-io📝 Commits (4)
50a073fperf: convert og-inline-fetch-assets transform to async I/O with per-build cache7d3f8ccfix: use strict undefined check in og-inline cache and restore spies via afterEach396795efix: address og-inline review feedback7950f0dstyle: format og-inline test assertions📊 Changes
2 files changed (+208 additions, -13 deletions)
View changed files
📝
packages/vinext/src/index.ts(+40 -13)➕
tests/og-inline.test.ts(+168 -0)📄 Description
Closes #441
Summary
vinext:og-inline-fetch-assetsplugin'stransformhook from synchronousfs.readFileSync()toasyncwithfs.promises.readFile(), unblocking the Vite transform pipelineMap<string, string>cache so repeated reads of the same asset file (common with shared fonts across modules) hit memory instead of disktests/og-inline.test.tswith 7 tests covering guard clause, both transform patterns, file-not-found handling, async assertion, and cache-hit verificationTest plan
pnpm test tests/og-inline.test.ts— 7/7 passpnpm test tests/deploy.test.ts tests/build-optimization.test.ts— 263/263 passpnpm run lint— 0 warnings, 0 errorspnpm run typecheck— clean🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.