avajs/ava

Support `.ava` cacheDir for better compatibility with Yarn PnP

開放

#3,226 建立於 2023年7月28日

 (3 則留言) (0 個反應) (0 位負責人)JavaScript (1,408 個分叉)batch import
enhancementhelp wantedscope:internals

倉庫指標

星標
 (20,600 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hello,

We're using Yarn 3 with PnP in our mono-repo, and find that ava is creating unwanted node_modules directories in our workspace (with node_modules/.cache/ava/failing-tests.json) This is a result of https://github.com/avajs/ava/blob/f047694d86a8ee7af2e998baf28812770e9ea71e/lib/cli.js#L256

Sometimes the existence of node_modules confuses the pnp patched executables (eg. eslint), so the mere existence of node_modules can sometimes cause issues with things working reliable.

It would be great if you supported some manner of specifying the cache directory or simply defaulted to projectDir/.ava and recommended adding .ava to the .gitignore.

Thanks!

貢獻者指南