From 5a44ce13c6e806704823929c9f66506550804252 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 22 Dec 2024 18:46:04 +0800 Subject: [PATCH] chore: add EOL for json write --- packages/components/package.json | 2 +- packages/core/package.json | 2 +- packages/electron/package.json | 2 +- packages/firebase/package.json | 2 +- packages/integrations/package.json | 2 +- packages/math/package.json | 2 +- packages/metadata/package.json | 2 +- packages/metadata/scripts/update.ts | 2 +- packages/nuxt/package.json | 2 +- packages/router/package.json | 2 +- packages/rxjs/package.json | 2 +- packages/shared/package.json | 2 +- scripts/build.ts | 2 +- scripts/export-size.ts | 2 +- scripts/utils.ts | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index f3ea67b1a67..1a9e3692875 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -36,4 +36,4 @@ "@vueuse/shared": "workspace:*", "vue": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/core/package.json b/packages/core/package.json index a5c443c8e84..29c272e65f8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -42,4 +42,4 @@ "@vueuse/shared": "workspace:*", "vue": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/electron/package.json b/packages/electron/package.json index de4c08a1aa1..62d7a8e7c0b 100644 --- a/packages/electron/package.json +++ b/packages/electron/package.json @@ -42,4 +42,4 @@ "devDependencies": { "electron": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/firebase/package.json b/packages/firebase/package.json index bcb37e0e517..d2c4df53c2d 100644 --- a/packages/firebase/package.json +++ b/packages/firebase/package.json @@ -53,4 +53,4 @@ "@vueuse/shared": "workspace:*", "vue": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/integrations/package.json b/packages/integrations/package.json index a664a82e0a0..a8917f6db82 100644 --- a/packages/integrations/package.json +++ b/packages/integrations/package.json @@ -166,4 +166,4 @@ "sortablejs": "catalog:", "universal-cookie": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/math/package.json b/packages/math/package.json index 67f5226f0c0..39b95624445 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -37,4 +37,4 @@ "@vueuse/shared": "workspace:*", "vue": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 9554a90b51c..1f85b3e4279 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -36,4 +36,4 @@ "scripts": { "update": "esno scripts/update.ts" } -} \ No newline at end of file +} diff --git a/packages/metadata/scripts/update.ts b/packages/metadata/scripts/update.ts index ce85f0d7a59..c34e742c2cd 100644 --- a/packages/metadata/scripts/update.ts +++ b/packages/metadata/scripts/update.ts @@ -154,7 +154,7 @@ export async function readMetadata() { async function run() { const indexes = await readMetadata() - await fs.writeFile(join(DIR_PACKAGE, 'index.json'), JSON.stringify(indexes, null, 2)) + await fs.writeFile(join(DIR_PACKAGE, 'index.json'), `${JSON.stringify(indexes, null, 2)}\n`) } run() diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index cd44994003e..6e5b1122762 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -48,4 +48,4 @@ "nuxt": "catalog:", "unimport": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/router/package.json b/packages/router/package.json index cb70c5d6a6e..0ff091265b4 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -43,4 +43,4 @@ "devDependencies": { "vue-router": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/rxjs/package.json b/packages/rxjs/package.json index 1825fbf63a9..947117ac11c 100644 --- a/packages/rxjs/package.json +++ b/packages/rxjs/package.json @@ -44,4 +44,4 @@ "devDependencies": { "rxjs": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/shared/package.json b/packages/shared/package.json index c6bc4bf827f..4bcb1b15418 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -34,4 +34,4 @@ "dependencies": { "vue": "catalog:" } -} \ No newline at end of file +} diff --git a/scripts/build.ts b/scripts/build.ts index 6632e29e38c..934b21a64e5 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -62,7 +62,7 @@ async function buildMetaFiles() { } } delete packageJSON.devDependencies - await fs.writeFile(path.join(packageDist, 'package.json'), JSON.stringify(packageJSON, null, 2)) + await fs.writeFile(path.join(packageDist, 'package.json'), `${JSON.stringify(packageJSON, null, 2)}\n`) } } diff --git a/scripts/export-size.ts b/scripts/export-size.ts index 5da80f53438..15f1459d5cc 100644 --- a/scripts/export-size.ts +++ b/scripts/export-size.ts @@ -55,7 +55,7 @@ async function run() { await fs.rm(join(packagesRoot, 'shared/index.mjs'), { force: true }) await fs.rm(join(packagesRoot, 'core/index.mjs'), { force: true }) await fs.writeFile('packages/export-size.md', md, 'utf-8') - await fs.writeFile('packages/export-size.json', JSON.stringify(mdJSON, null, 2)) + await fs.writeFile('packages/export-size.json', `${JSON.stringify(mdJSON, null, 2)}\n`) } run() diff --git a/scripts/utils.ts b/scripts/utils.ts index e0e35c6cf61..da3191985c5 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -281,7 +281,7 @@ export async function updatePackageJSON(indexes: PackageIndexes) { }) } - await fs.writeFile(packageJSONPath, JSON.stringify(packageJSON, null, 2)) + await fs.writeFile(packageJSONPath, `${JSON.stringify(packageJSON, null, 2)}\n`) } }