You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a temporary module copy fails, cacheResult() returns the original module result, but the caller was still setting transformResult.__vitestTmp to the failed path. A subsequent fetch could then treat the nonexistent file as cached and fail with ENOENT.
This change only stores the tmp path when the cache operation actually returns a filesystem-backed result.
Added a regression test that simulates an ENOSPC write failure, fetches the same module again, and verifies that the module continues to be served inline without retaining the failed tmp path.
AI-assisted - ChatGPT assisted with the investigation and draft. I reviewed and tested the changes.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
Ideally, include a test that fails without this PR but passes with it.
Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.
Tests
Run the tests with pnpm test:ci.
Documentation
If you introduce new functionality, document it. You can run documentation with pnpm run docs.
Changesets
Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Description
Resolves #11452
When writing a temporary module copy fails,
cacheResult()returns the original module result, but the caller was still settingtransformResult.__vitestTmpto the failed path. A subsequent fetch could then treat the nonexistent file as cached and fail withENOENT.This change only stores the tmp path when the cache operation actually returns a filesystem-backed result.
Added a regression test that simulates an
ENOSPCwrite failure, fetches the same module again, and verifies that the module continues to be served inline without retaining the failed tmp path.AI-assisted - ChatGPT assisted with the investigation and draft. I reviewed and tested the changes.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docs.Changesets
feat:,fix:,perf:,docs:, orchore:.Original implementation from #11462 by @arjunharshana
All reactions