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
|
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 = oldProcessCwd
https://github.com/jayu/rev-dep/blob/master/src/lib/getDepsTree.ts#L15-L25
Thank you for this lib!
I've noticed a bug around
contextoption. Searching for dependencies using custom context does not work as expected.Perhaps it's because you use
const currentDirectory = process.cwd();instead ofconst currentDirectory = options.contextindpdm/src/parser.ts
Line 136 in c389480
To workaround this I had to do the following, but I would rather not :D
https://github.com/jayu/rev-dep/blob/master/src/lib/getDepsTree.ts#L15-L25