style: 移除多个文件末尾的空行并格式化代码

refactor(ci): 统一字符串引号风格为单引号
refactor(color): 简化数组返回语法
docs: 调整文档中的代码注释格式
chore: 添加.gitattributes文件配置行尾符
This commit is contained in:
Linkon
2026-01-18 19:43:26 +08:00
parent 8c48b35c08
commit 24e9e6f6f8
12 changed files with 14 additions and 23 deletions
+3 -2
View File
@@ -1,7 +1,9 @@
import fs from 'fs'
import path from 'path'
const version = String(process.argv[2] || '').trim().replace(/^v/i, '')
const version = String(process.argv[2] || '')
.trim()
.replace(/^v/i, '')
if (!version) {
process.stderr.write('缺少版本号参数,例如:node scripts/ci/apply-version.mjs 1.2.3\n')
process.exit(1)
@@ -17,4 +19,3 @@ const pkgPath = path.join(process.cwd(), 'package.json')
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
pkg.version = version
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8')
-1
View File
@@ -88,4 +88,3 @@ if (process.env.GITHUB_OUTPUT) {
} else {
process.stdout.write(`${JSON.stringify(outputs, null, 2)}\n`)
}