Skip to content

glob in ignore option does not work #445

@aczekajski

Description

@aczekajski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions