Merge pull request #411 from felixhao28/master

Support linked npm modules
This commit is contained in:
João Moreno 2020-01-13 12:22:49 +01:00 committed by GitHub
commit 2a02458bad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ function checkNPM(cancellationToken?: CancellationToken): Promise<void> {
function getNpmDependencies(cwd: string): Promise<string[]> {
return checkNPM()
.then(() => exec('npm list --production --parseable --depth=99999', { cwd, maxBuffer: 5000 * 1024 }))
.then(() => exec('npm list --production --parseable --depth=99999 --link=true', { cwd, maxBuffer: 5000 * 1024 }))
.then(({ stdout }) => stdout
.split(/[\r\n]/)
.filter(dir => path.isAbsolute(dir)));