Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
sort-deps: newline is now included in created file
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Sep 17, 2018
1 parent 8896693 commit 268a999
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/clean-pkg-json.ts
Expand Up @@ -174,7 +174,7 @@ const cmd: CommandModule = {
}

//tslint:disable-next-line:no-magic-numbers
fs.writeFileSync(file, JSON.stringify(contents, null, 2));
fs.writeFileSync(file, JSON.stringify(contents, null, 2).trim() + '\n');
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/sort-deps.ts
Expand Up @@ -52,7 +52,7 @@ const cmd: CommandModule = {
}
}

fs.writeFileSync(file, JSON.stringify(contents, null, c.indent));
fs.writeFileSync(file, JSON.stringify(contents, null, c.indent) + '\n');
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/commands/sort-deps.ts
Expand Up @@ -35,7 +35,7 @@ describe('sort-deps', () => {
},
null,
3 //tslint:disable-line:no-magic-numbers
);
) + '\n';

expect(await fixture.readOut('fixture.json')).to.eq(expected);
});
Expand Down

0 comments on commit 268a999

Please sign in to comment.