repo-audit-tool 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/repo-audit.mjs +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-audit-tool",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "仓库标准化审计工具 + 工程脚手架生成器(零依赖)",
5
5
  "type": "module",
6
6
  "main": "repo-audit.mjs",
package/repo-audit.mjs CHANGED
@@ -274,7 +274,7 @@ function findNestedYaml(lines, startIdx, baseIndent, segments) {
274
274
  // P3: 项目定位识别 —— 扫描 README 首段检测个人/自用项目
275
275
 
276
276
  // P5: 加载仓库级 .auditrc.yaml 豁免配置
277
- function loadAuditrc(repoPath) {
277
+ export function loadAuditrc(repoPath) {
278
278
  const rcPath = join(repoPath, '.auditrc.yaml')
279
279
  if (!existsSync(rcPath)) return { waive: [] }
280
280
  const content = readFileSafe(rcPath)
@@ -295,7 +295,7 @@ function loadAuditrc(repoPath) {
295
295
  } else if (cur && trimmed.startsWith('reason:')) {
296
296
  cur.reason = trimmed.replace('reason:', '').replace(/['"]/g, '').trim()
297
297
  } else if (cur && trimmed.startsWith('since:')) {
298
- cur.since = trimmed.replace('since:', '').trim()
298
+ cur.since = trimmed.replace('since:', '').replace(/['"]/g, '').trim()
299
299
  }
300
300
  }
301
301
  if (cur) waive.push(cur)