Skip to content

Commit

Permalink
feat: Add more analytics around monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Jun 24, 2019
1 parent 7f8a635 commit acb34dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli/commands/monitor.ts
Expand Up @@ -17,6 +17,7 @@ import {ModuleInfo} from '../../lib/module-info'; // TODO(kyegupov): fix import
import { SingleDepRootResult, MultiDepRootsResult, isMultiResult, MonitorError, MonitorOptions } from '../../lib/types';
import { MethodArgs, ArgsOptions } from '../args';
import { maybePrintDeps } from '../../lib/print-deps';
import * as analytics from '../../lib/analytics';

const SEPARATOR = '\n-------------------------------------------------------\n';

Expand Down Expand Up @@ -101,6 +102,8 @@ async function monitor(...args0: MethodArgs): Promise<any> {
// Scan the project dependencies via a plugin

const pluginOptions = plugins.getPluginOptions(packageManager, options);
analytics.add('packageManager', packageManager);
analytics.add('pluginOptions', pluginOptions);

// TODO: the type should depend on multiDepRoots flag
const inspectResult: SingleDepRootResult|MultiDepRootsResult = await promiseOrCleanup(
Expand Down

0 comments on commit acb34dd

Please sign in to comment.