[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix(forks): do not fail with Windows Defender enabled (#8967)

authored by

Vladimir and committed by
GitHub
(Nov 7, 2025, 12:38 PM +0100) c79f47c6 7ed99cdf

+4 -2
+4 -2
packages/vitest/src/node/environments/fetchModule.ts
··· 139 139 } 140 140 if (promises.has(tmp)) { 141 141 await promises.get(tmp) 142 - Reflect.set(transformResult, '_vitestTmp', tmp) 143 142 return getCachedResult(result, tmp) 144 143 } 145 144 promises.set( ··· 148 147 atomicWriteFile(tmp, code) 149 148 // Fallback to non-atomic write for windows case where file already exists: 150 149 .catch(() => writeFile(tmp, code, 'utf-8')) 151 - .finally(() => promises.delete(tmp)), 150 + .finally(() => { 151 + Reflect.set(transformResult, '_vitestTmp', tmp) 152 + promises.delete(tmp) 153 + }), 152 154 ) 153 155 await promises.get(tmp) 154 156 return getCachedResult(result, tmp)