Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move to the new version of nodejs-lockfile-parser #288

Merged
merged 1 commit into from
Dec 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"snyk-gradle-plugin": "2.1.1",
"snyk-module": "1.9.1",
"snyk-mvn-plugin": "2.0.0",
"snyk-nodejs-lockfile-parser": "1.8.0",
"snyk-nodejs-lockfile-parser": "1.9.0",
"snyk-nuget-plugin": "1.6.5",
"snyk-php-plugin": "1.5.1",
"snyk-policy": "1.13.1",
Expand Down
5 changes: 3 additions & 2 deletions src/lib/plugins/npm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ async function generateDependenciesFromLockfile(root, options, targetFile) {

const manifestFile = await fs.readFile(manifestFileFullPath, 'utf-8');
const lockFile = await fs.readFile(lockFileFullPath, 'utf-8');
const defaultManifestFileName = path.relative(root, manifestFileFullPath);

return lockFileParser
.buildDepTree(manifestFile, lockFile, options.dev, lockFileParser.LockfileType.npm);
return lockFileParser.buildDepTree(manifestFile, lockFile, options.dev,
lockFileParser.LockfileType.npm, true, defaultManifestFileName);
}

5 changes: 3 additions & 2 deletions src/lib/plugins/yarn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ async function generateDependenciesFromLockfile(root, options, targetFile) {

const manifestFile = await fs.readFile(manifestFileFullPath, 'utf-8');
const lockFile = await fs.readFile(lockFileFullPath, 'utf-8');
const defaultManifestFileName = path.relative(root, manifestFileFullPath);

return lockFileParser
.buildDepTree(manifestFile, lockFile, options.dev, lockFileParser.LockfileType.yarn);
return lockFileParser.buildDepTree(manifestFile, lockFile, options.dev,
lockFileParser.LockfileType.yarn, true, defaultManifestFileName);
}

function getRuntimeVersion() {
Expand Down