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
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
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!
The text was updated successfully, but these errors were encountered:
andrewzey
changed the title
Consider allowing specifying cacheDir for better compatibility with Yarn PnP
Consider allowing specifying cacheDir or at least no node_modules for better compatibility with Yarn PnP
Jul 28, 2023
I was thinking about this the other day actually, and yes I agree that should be an option. Placing it under node_modulesby default does provide the best out-of-the box experience though.
cache is currently configurable as a boolean, I propose we add '.ava' as a valid value which would then use path.join(projectDir, '.ava') as the cache dir. All other values should result in a configuration error, I don't think we should make this super configurable just yet.
However this does leave us with the following code:
Otherwise, insist on using this node_modules/.cache/ava directory
And then we'd have to document that as a caveat.
What do you think?
novemberborn
changed the title
Consider allowing specifying cacheDir or at least no node_modules for better compatibility with Yarn PnP
Support .ava cacheDir for better compatibility with Yarn PnP
Jul 30, 2023
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 (withnode_modules/.cache/ava/failing-tests.json
) This is a result ofava/lib/cli.js
Line 256 in f047694
Sometimes the existence of
node_modules
confuses the pnp patched executables (eg.eslint
), so the mere existence ofnode_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!
The text was updated successfully, but these errors were encountered: