diff --git a/package-lock.json b/package-lock.json index 28d288c..d901a5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bumpr", - "version": "2.16.0", + "version": "2.16.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bumpr", - "version": "2.16.0", + "version": "2.16.2", "license": "MIT", "dependencies": { "chalk": "^4.1.1", diff --git a/src/bumpr.js b/src/bumpr.js index e340482..09fb0e7 100644 --- a/src/bumpr.js +++ b/src/bumpr.js @@ -72,7 +72,7 @@ function bumpVersion(fullPath, info) { // eslint-disable-next-line no-param-reassign info.version = newVersion src.version = newVersion - return fsWriteFile(fullPath, JSON.stringify(src, null, 2), {encoding: 'utf-8'}) + return fsWriteFile(fullPath, `${JSON.stringify(src, null, 2)}\n`, {encoding: 'utf-8'}) }) } @@ -565,7 +565,7 @@ class Bumpr { const filename = this.config.features.logging.file Logger.log(`Writing ${JSON.stringify(logInfo)} to ${filename}`) - return writeFile(filename, JSON.stringify(logInfo, null, 2)).then(() => info) + return writeFile(filename, `${JSON.stringify(logInfo, null, 2)}\n`).then(() => info) } /** diff --git a/src/tests/bumpr.test.js b/src/tests/bumpr.test.js index cfc3836..eee7d91 100644 --- a/src/tests/bumpr.test.js +++ b/src/tests/bumpr.test.js @@ -2302,7 +2302,7 @@ describe('Bumpr', () => { scope: 'patch', version: '1.2.3', } - expect(writeFile).toHaveBeenCalledWith('the-log-file', JSON.stringify(logInfo, null, 2)) + expect(writeFile).toHaveBeenCalledWith('the-log-file', `${JSON.stringify(logInfo, null, 2)}\n`) }) it('should resolve with the info', () => {