Skip to content

Commit

Permalink
Add fileName to packageInfo object for typescript import nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
yazshel authored and yairhaimo committed Jun 21, 2018
1 parent 7ab0083 commit c811e77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/import-cost/src/tsParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function gatherPackages(sourceFile) {
if (ts.isImportDeclaration(node)) {
const importNode = node;
const packageInfo = {
fileName: sourceFile.fileName,
name: importNode.moduleSpecifier.text,
line: sourceFile.getLineAndCharacterOfPosition(importNode.getStart()).line + 1,
string: importNode.getText()
Expand Down

0 comments on commit c811e77

Please sign in to comment.