Skip to content

Commit

Permalink
chore: add EOL for json write
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 22, 2024
1 parent 6917c9b commit 5a44ce1
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"@vueuse/shared": "workspace:*",
"vue": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
"@vueuse/shared": "workspace:*",
"vue": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
"devDependencies": {
"electron": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
"@vueuse/shared": "workspace:*",
"vue": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@
"sortablejs": "catalog:",
"universal-cookie": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"@vueuse/shared": "workspace:*",
"vue": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"scripts": {
"update": "esno scripts/update.ts"
}
}
}
2 changes: 1 addition & 1 deletion packages/metadata/scripts/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
"nuxt": "catalog:",
"unimport": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"devDependencies": {
"vue-router": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/rxjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
"devDependencies": {
"rxjs": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"dependencies": {
"vue": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/export-size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
}
}

Expand Down

0 comments on commit 5a44ce1

Please sign in to comment.