git-fish-log 1.0.6 → 1.0.7

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.
@@ -48,6 +48,13 @@ npm link
48
48
  * `host`: 可选。私有部署的 GitLab 域名(如 `https://gitlab.mycompany.com`),缺省默认使用 `https://gitlab.com`。
49
49
  * `name`: 可选。给该数据源指定的别名(如 `my-company`),缺省时自动使用 host 域名作为别名。若别名已存在则会覆盖更新。
50
50
 
51
+ ## 🆕 v1.0.7 更新内容
52
+
53
+ - **摸鱼指数算法校准**:降低 `commitScore`、`lineScore`、`densityScore` 和 `spanScore` 的基础斜率,让轻量提交、小改动、正常工作跨度不再直接把摸鱼指数打到很低。
54
+ - **月报日历优化**:`每日摸鱼指数概览` 增加周几表头,并按周一到周日真实日历网格排列。
55
+ - **GitLab 全分支统计**:远程 Commit 查询增加 `all=true`,周报、月报、项目排行、时间分布和幽灵提交检测都会统计所有分支。
56
+ - **Node 兼容增强**:优先使用 Node 18+ 原生 `fetch`,低版本 Node 自动走内置 `http/https` fallback,避免 `fetch is not defined`。
57
+
51
58
  ---
52
59
 
53
60
  ## 📖 CLI 命令行示例
@@ -280,10 +287,10 @@ fish -g
280
287
 
281
288
  | 得分项 | 公式 | 设计意图 |
282
289
  |--------|------|----------|
283
- | 提交活跃度 | $\min(100,\ \log_2(N+1) \times 25)$ | 对数防刷 commit |
284
- | 工时跨度 | $\min(100,\ \sqrt{S} \times 25)$ | 平方根防拉长跨度 |
285
- | 代码活跃度 | $\min(100,\ \log_2(L+1) \times 12)$ | 对数防刷行数 |
286
- | 密度得分 | $N \le 1$ 时为 0,否则 $\min(100,\ D \times 50)$ | 单次提交无密度可言 |
290
+ | 提交活跃度 | $\min(100,\ \log_2(N+1) \times 18)$ | 对数防刷 commit,降低轻量提交惩罚 |
291
+ | 工时跨度 | $\min(100,\ \sqrt{S} \times 18)$ | 平方根防拉长跨度,避免正常工时过度爆肝 |
292
+ | 代码活跃度 | $\min(100,\ \log_2(L+1) \times 8)$ | 对数防刷行数,避免小改动直接拉低摸鱼指数 |
293
+ | 密度得分 | $N \le 1$ 时为 0,否则 $\min(100,\ D \times 35)$ | 单次提交无密度可言,密集提交才明显加分 |
287
294
  | 修仙得分 | $\min(100,\ Night \times 30)$ | 深夜加班证据 |
288
295
 
289
296
  ### 最终指数
package/README.md CHANGED
@@ -34,6 +34,13 @@
34
34
  * `name`: 可选。给该数据源指定的别名(如 `my-company`),缺省时自动使用 host 域名作为别名。若别名已存在则会覆盖更新。
35
35
 
36
36
 
37
+ ## 🆕 v1.0.7 更新内容
38
+
39
+ - 校准摸鱼指数算法:降低轻量提交、小改动和正常工时跨度对爆肝分的惩罚,避免「只要有提交就很低」。
40
+ - 优化月报每日摸鱼指数概览:按周一到周日真实日历排列,并标注周几。
41
+ - GitLab 远程扫描默认统计所有分支提交,不再只看默认分支。
42
+ - 修复低版本 Node 环境缺少 `fetch` 时 GitLab 连接失败的问题。
43
+
37
44
 
38
45
  ## 📖 CLI 命令行示例
39
46
 
package/dist/index.js CHANGED
@@ -528,10 +528,10 @@ function calculateDayIndices(commits, isWeekend = false) {
528
528
  const L = totalAdditions + totalDeletions;
529
529
  const avgLines = L / Math.max(N, 1);
530
530
  const D = N / (S + 1);
531
- const commitScore = Math.min(100, Math.log2(N + 1) * 25);
532
- const spanScore = Math.min(100, Math.sqrt(S) * 25);
533
- const lineScore = Math.min(100, Math.log2(L + 1) * 12);
534
- const densityScore = N <= 1 ? 0 : Math.min(100, D * 50);
531
+ const commitScore = Math.min(100, Math.log2(N + 1) * 18);
532
+ const spanScore = Math.min(100, Math.sqrt(S) * 18);
533
+ const lineScore = Math.min(100, Math.log2(L + 1) * 8);
534
+ const densityScore = N <= 1 ? 0 : Math.min(100, D * 35);
535
535
  const nightScore = Math.min(100, nightCount * 30);
536
536
  let hardworking = commitScore * 0.3 + lineScore * 0.3 + densityScore * 0.2 + spanScore * 0.2;
537
537
  if (isWeekend && N > 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "git-fish-log",
3
- "version": "1.0.6",
4
- "description": "🐟 Git 摸鱼 & 爆肝分析器 CLI — 给你的提交记录生成摸鱼指数和 AI 锐评",
3
+ "version": "1.0.7",
4
+ "description": "🐟 Git 摸鱼 & 爆肝分析器 CLI — 给你的提交记录生成摸鱼指数和锐评",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "bin": {