Uh oh!
There was an error while loading. Please reload this page.
feat(kit): support followSymbolicLinks option for resolveFiles - #6240
Conversation
✅ Deploy Preview for nuxt3-docs canceled.
|
resolveFiles by allowing opt-out of followSymbolicLinksfollowSymbolicLinks option for resolveFiles| export async function resolveFiles (path: string, pattern: string | string[]) { | ||
| const files = await globby(pattern, { cwd: path, followSymbolicLinks: true }) | ||
| export async function resolveFiles (path: string, pattern: string | string[], followSymbolicLinks: boolean = true) { |
There was a problem hiding this comment.
Can you please make 3rd argument an object { followSymbolicLinks }
pi0
commented
Jul 29, 2022
Thanks for PR @Diizzayy. In the future, please consider opening an issue describing improvement and enhancement 🙏🏼 Also what is the current use case you have for this utility for skipping link resolution? Knowing context, can help to improve utilities and be aware of usecases. |
Diizzayy
commented
Jul 29, 2022
Sorry about that, I had begun writing an issue when I realized that this was the underlying cause.
@pi0 When using pnpm workspaces which uses symlinks between packages, you'll find that based on how the resolveFiles utility is used in a module, it's default behavior ( following symlinks ) can result in scanning deeply nested files in |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
📚 Description
This PR allows module authors to opt-out of following symbolic links when using
resolveFiles, as there are many cases where this current default isn't the desired.