Skip to content

Commit

Permalink
Merge pull request #311 from snyk/fix/corrects-analytics-keys
Browse files Browse the repository at this point in the history
fix: corrected analytics keys to match conventions.
  • Loading branch information
Ryan Taylor committed Dec 19, 2018
2 parents 397b857 + 49abf37 commit c8cf50c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/snyk-test/npm/index.js
Expand Up @@ -137,7 +137,10 @@ function generateDependenciesFromLockfile(root, options, targetFile) {
const lockFile = fileSystem.readFileSync(lockFileFullPath, 'utf-8');

analytics.add('local', true);
analytics.add('using lockfile (' + targetFile + ') to get dependency tree', true);
analytics.add('generating-node-dependency-tree', {
lockFile: true,
targetFile,
});

const lockFileType = targetFile.endsWith('yarn.lock') ?
lockFileParser.LockfileType.yarn : lockFileParser.LockfileType.npm;
Expand Down Expand Up @@ -172,7 +175,10 @@ function getDependenciesFromNodeModules(root, options, targetFile) {
`without dependencies.\nPlease run '${packageManager} install' first.`);
}
analytics.add('local', true);
analytics.add('using node_modules to get dependency tree', true);
analytics.add('generating-node-dependency-tree', {
lockFile: false,
targetFile,
});
options.root = root;
const resolveModuleSpinnerLabel = 'Analyzing npm dependencies for ' +
path.dirname(path.resolve(root, targetFile));
Expand Down

0 comments on commit c8cf50c

Please sign in to comment.