nft icon indicating copy to clipboard operation
nft copied to clipboard

glob in ignore option does not work

Open aczekajski opened this issue 1 year ago • 0 comments

Easiest way to reproduce:

// type in node repl
const { nodeFileTrace } = require('@vercel/nft');
(await nodeFileTrace([require.resolve('glob')], { ignore: ['node_modules/**'] })).fileList;

This outputs exactly same list of files as if no ignore option was provided at all. It should output list containing only the input file itself (result of require.resolve).

I have a hunch it happens only on windows (but I have no way of confirming it now), as on windows the package outputs \ as path separators. However I also tried 'node_modules\\**' and it didn't work as well.

Env: OS: Windows 10 Node: v18.19.0 @vercel/nft version: 0.27.4

aczekajski avatar Oct 09 '24 08:10 aczekajski