From a284f7495086833b9cf5bb35c4bf949325bfbaca Mon Sep 17 00:00:00 2001 From: Joel Chen Date: Sun, 24 Jan 2021 13:00:27 -0800 Subject: [PATCH] save file with EOF --- packages/xarc-app-dev/src/lib/tasks/package-json.ts | 5 ++++- samples/react-jest-app/package.json | 2 +- samples/stylus-sample/package.json | 2 +- samples/subapp2-poc/package.json | 3 ++- samples/subapp2-todo-app/package.json | 2 +- samples/universal-react-node/package.json | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/xarc-app-dev/src/lib/tasks/package-json.ts b/packages/xarc-app-dev/src/lib/tasks/package-json.ts index 33ba361ab..d4e4f42c6 100644 --- a/packages/xarc-app-dev/src/lib/tasks/package-json.ts +++ b/packages/xarc-app-dev/src/lib/tasks/package-json.ts @@ -48,7 +48,10 @@ export const loadPkgJson = (dir: string) => { * @returns none */ export const savePkgJson = (dir: string, pkgJson: any) => { - return Fs.writeFileSync(Path.resolve(dir, "package.json"), JSON.stringify(pkgJson, null, 2)); + return Fs.writeFileSync( + Path.resolve(dir, "package.json"), + `${JSON.stringify(pkgJson, null, 2)}\n` + ); }; /* eslint-disable @typescript-eslint/no-var-requires */ diff --git a/samples/react-jest-app/package.json b/samples/react-jest-app/package.json index 89d816400..a8bf8c20f 100644 --- a/samples/react-jest-app/package.json +++ b/samples/react-jest-app/package.json @@ -90,4 +90,4 @@ } }, "optionalDependencies": {} -} \ No newline at end of file +} diff --git a/samples/stylus-sample/package.json b/samples/stylus-sample/package.json index 4b8e3bc66..2990f7052 100644 --- a/samples/stylus-sample/package.json +++ b/samples/stylus-sample/package.json @@ -68,4 +68,4 @@ "@xarc/opt-stylus": "../../packages/xarc-opt-stylus" } } -} \ No newline at end of file +} diff --git a/samples/subapp2-poc/package.json b/samples/subapp2-poc/package.json index 7178a60ba..b4bd2b7bc 100644 --- a/samples/subapp2-poc/package.json +++ b/samples/subapp2-poc/package.json @@ -31,6 +31,7 @@ "npm": ">= 6" }, "dependencies": { + "@babel/runtime": "^7.12.5", "@xarc/app": "^8.1.8", "@xarc/fastify-server": "^2.0.0", "@xarc/react": "^0.0.3", @@ -63,4 +64,4 @@ "@xarc/opt-stylus": "../../packages/xarc-opt-stylus" } } -} +} \ No newline at end of file diff --git a/samples/subapp2-todo-app/package.json b/samples/subapp2-todo-app/package.json index 71df537b3..63ffc6ba3 100644 --- a/samples/subapp2-todo-app/package.json +++ b/samples/subapp2-todo-app/package.json @@ -53,4 +53,4 @@ "@xarc/app-dev": "../../packages/xarc-app-dev" } } -} \ No newline at end of file +} diff --git a/samples/universal-react-node/package.json b/samples/universal-react-node/package.json index bbee45709..ef14a2774 100644 --- a/samples/universal-react-node/package.json +++ b/samples/universal-react-node/package.json @@ -86,4 +86,4 @@ } }, "optionalDependencies": {} -} \ No newline at end of file +}