From 820a9fa962d79ee1a9c41e3037892aaaabc586b5 Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Sun, 6 Jul 2025 18:11:22 -0600 Subject: [PATCH] fix adding newlines after updating dependencies --- data/cores/README.md | 1 - data/cores/core-README.md | 1 - data/localization/ko-KO.json | 2 +- update.js | 6 ++++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/data/cores/README.md b/data/cores/README.md index f95fa40..c897e7a 100644 --- a/data/cores/README.md +++ b/data/cores/README.md @@ -19,4 +19,3 @@ To install a specific core, run the following command: ```bash npm install @emulatorjs/core- ``` - diff --git a/data/cores/core-README.md b/data/cores/core-README.md index 634618c..68407ac 100644 --- a/data/cores/core-README.md +++ b/data/cores/core-README.md @@ -22,4 +22,3 @@ To install all cores, run the following command: ```bash npm install @emulatorjs/cores ``` - diff --git a/data/localization/ko-KO.json b/data/localization/ko-KO.json index 1a230af..412abaa 100644 --- a/data/localization/ko-KO.json +++ b/data/localization/ko-KO.json @@ -306,7 +306,7 @@ "DPAD_UP": "DPAD_위", "DPAD_DOWN": "DPAD_아래", "DPAD_LEFT": "DPAD_왼쪽", - "DPAD_RIGHT": "DPAD_오른쪽" + "DPAD_RIGHT": "DPAD_오른쪽", "Disks": "디스크", "Exit EmulatorJS": "EmulatorJS 끝내기", "BUTTON_1": "버튼_1", diff --git a/update.js b/update.js index 02ee1a7..44e3a35 100644 --- a/update.js +++ b/update.js @@ -27,12 +27,18 @@ const updateDependencies = async () => { try { fs.copyFileSync(socket_io, ejs_socket_io); + if (!fs.readFileSync(ejs_socket_io, 'utf8').endsWith('\n')) { + fs.appendFileSync(ejs_socket_io, '\n'); + } } catch(error) { console.error("Error updating socket.io:", error.message); } try { fs.copyFileSync(nipplejs, ejs_nipplejs); + if (!fs.readFileSync(ejs_nipplejs, 'utf8').endsWith('\n')) { + fs.appendFileSync(ejs_nipplejs, '\n'); + } } catch(error) { console.error("Error updating nipplejs:", error.message); }