From c514f563e3dde26ed643885f69cc1ff862dc1574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 17 Mar 2016 23:06:23 +0100 Subject: [PATCH] fix(lib): keep newline at the end of package.json fixes #159 --- src/commitizen/adapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commitizen/adapter.js b/src/commitizen/adapter.js index b2d3d041..7d7eff70 100644 --- a/src/commitizen/adapter.js +++ b/src/commitizen/adapter.js @@ -48,7 +48,7 @@ function addPathToAdapterConfig(sh, cliPath, repoPath, adapterNpmName) { if(_.get(packageJsonContent,'config.commitizen.path') !== adapterNpmName) { newPackageJsonContent = _.merge(packageJsonContent, commitizenAdapterConfig); } - fs.writeFileSync(packageJsonPath, JSON.stringify(newPackageJsonContent, null, indent)); + fs.writeFileSync(packageJsonPath, JSON.stringify(newPackageJsonContent, null, indent) + '\n'); } /**