-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Thank you for this lib!
I've noticed a bug around context option. Searching for dependencies using custom context does not work as expected.
Perhaps it's because you use const currentDirectory = process.cwd(); instead of const currentDirectory = options.context in
Line 136 in c389480
| const currentDirectory = process.cwd(); |
To workaround this I had to do the following, but I would rather not :D
// dpdm does not support custom search directory :/
const oldProcessCwd = process.cwd
process.cwd = () => cwd
deps = cleanupDpdmDeps(
await parseDependencyTree(entryPoints, {
context: cwd // does not work as expected
})
)
process.cwd = oldProcessCwdhttps://github.com/jayu/rev-dep/blob/master/src/lib/getDepsTree.ts#L15-L25
Metadata
Metadata
Assignees
Labels
No labels