pi-session-cleanup 1.1.3 → 1.1.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [1.1.4] - 2026-06-16
6
+
7
+ ### Fixed
8
+ - Added round-trip date validation for parsed calendar timestamps so invalid dates (e.g., month 13 or day 32) no longer produce false-positive sort keys.
9
+
3
10
  ## 1.1.3 - 2026-06-01
4
11
 
5
12
  - Deferred command module loading for `/session-cleanup` and `/nix` handlers while preserving inline completions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-session-cleanup",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Pi extension for interactive batch session cleanup and safe deletion.",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -52,8 +52,8 @@
52
52
  ]
53
53
  },
54
54
  "peerDependencies": {
55
- "@earendil-works/pi-coding-agent": "^0.74.0 || ^0.75.0",
56
- "@earendil-works/pi-tui": "^0.74.0 || ^0.75.0"
55
+ "@earendil-works/pi-coding-agent": "^0.74.0 || ^0.75.0 || ^0.78.0 || ^0.79.0",
56
+ "@earendil-works/pi-tui": "^0.74.0 || ^0.75.0 || ^0.78.0 || ^0.79.0"
57
57
  },
58
58
  "repository": {
59
59
  "type": "git",
@@ -69,7 +69,23 @@ function parseCalendarCandidate(path: string): number | null {
69
69
  }
70
70
 
71
71
  const utcTimestamp = Date.UTC(year, month - 1, day, hour, minute, second);
72
- return Number.isFinite(utcTimestamp) ? utcTimestamp : null;
72
+ if (!Number.isFinite(utcTimestamp)) {
73
+ return null;
74
+ }
75
+
76
+ const parsed = new Date(utcTimestamp);
77
+ if (
78
+ parsed.getUTCFullYear() !== year ||
79
+ parsed.getUTCMonth() !== month - 1 ||
80
+ parsed.getUTCDate() !== day ||
81
+ parsed.getUTCHours() !== hour ||
82
+ parsed.getUTCMinutes() !== minute ||
83
+ parsed.getUTCSeconds() !== second
84
+ ) {
85
+ return null;
86
+ }
87
+
88
+ return utcTimestamp;
73
89
  }
74
90
 
75
91
  function timestampFromPath(sessionPath: string): number {