`followSymbolicLinks: false` excludes symlinks
netlify/build has some code similar to:
const pathGroups = await glob('**', {
absolute: true,
dot: true,
ignore: excludePatterns,
onlyFiles: false,
markDirectories: true,
followSymbolicLinks: false,
})
const paths = pathGroups.filter((path) => !path.endsWith('/'))
This behaves differently in tinyglobby than in fast-glob
See here for a reproduction: https://github.com/benmccann/tinyglobby-symlinks
Blocks https://github.com/netlify/build/pull/6354
The problem is this line:
https://github.com/SuperchupuDev/tinyglobby/blob/38f4f5bbace2524f2adcc9287d1096d026bb8d28/src/index.ts#L266
Maybe we need a new followSymlinks option in fdir?
Maybe we could implement this using an exclude function which checks if the parent dir is a sym link? https://github.com/thecodrr/fdir/blob/master/documentation.md#excludefunction
It'd be a semi-expensive way to implement this, but users don't set followSymbolicLinks: false often (as evidenced by the fact that no one noticed it was broken until now). I've never seen it used in any project outside of the pending PR for netlify/build