@wipcomputer/wip-release 1.9.41 → 1.9.43

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 (3) hide show
  1. package/cli.js +2 -1
  2. package/core.mjs +12 -3
  3. package/package.json +1 -1
package/cli.js CHANGED
@@ -77,7 +77,8 @@ let notesSource = (notes !== null && notes !== undefined && notes !== '') ? 'fla
77
77
  const { readdirSync } = await import('node:fs');
78
78
  const devUpdatesDir = join(process.cwd(), 'ai', 'dev-updates');
79
79
  if (existsSync(devUpdatesDir)) {
80
- const today = new Date().toISOString().split('T')[0];
80
+ const d = new Date();
81
+ const today = `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')}`;
81
82
  const todayFiles = readdirSync(devUpdatesDir)
82
83
  .filter(f => f.startsWith(today) && f.endsWith('.md'))
83
84
  .sort()
package/core.mjs CHANGED
@@ -89,7 +89,8 @@ export function syncSkillVersion(repoPath, newVersion) {
89
89
  */
90
90
  export function updateChangelog(repoPath, newVersion, notes) {
91
91
  const changelogPath = join(repoPath, 'CHANGELOG.md');
92
- const date = new Date().toISOString().split('T')[0];
92
+ const d = new Date();
93
+ const date = `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')}`;
93
94
 
94
95
  // Bug fix #121: never silently default to "Release." when notes are empty.
95
96
  // If notes are empty at this point, warn loudly.
@@ -134,7 +135,14 @@ function trashReleaseNotes(repoPath) {
134
135
  for (const f of files) {
135
136
  renameSync(join(repoPath, f), join(trashDir, f));
136
137
  execFileSync('git', ['add', join('_trash', f)], { cwd: repoPath, stdio: 'pipe' });
137
- execFileSync('git', ['rm', '--cached', f], { cwd: repoPath, stdio: 'pipe' });
138
+ // Only git rm if the file was tracked (committed or staged).
139
+ // Untracked scaffolded files from failed releases just need the rename.
140
+ try {
141
+ execFileSync('git', ['ls-files', '--error-unmatch', f], { cwd: repoPath, stdio: 'pipe' });
142
+ execFileSync('git', ['rm', '--cached', f], { cwd: repoPath, stdio: 'pipe' });
143
+ } catch {
144
+ // File wasn't tracked. Rename already moved it.
145
+ }
138
146
  }
139
147
  return files.length;
140
148
  }
@@ -579,7 +587,8 @@ function checkInterfaceCoverage(repoPath) {
579
587
  */
580
588
  function syncProductDocs(repoPath, newVersion) {
581
589
  let updated = 0;
582
- const today = new Date().toISOString().split('T')[0];
590
+ const td = new Date();
591
+ const today = `${td.getFullYear()}-${String(td.getMonth()+1).padStart(2,'0')}-${String(td.getDate()).padStart(2,'0')}`;
583
592
 
584
593
  // 1. roadmap.md
585
594
  const roadmapPath = join(repoPath, 'ai', 'product', 'plans-prds', 'roadmap.md');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-release",
3
- "version": "1.9.41",
3
+ "version": "1.9.43",
4
4
  "type": "module",
5
5
  "description": "One-command release pipeline. Bumps version, updates changelog + SKILL.md, publishes to npm + GitHub.",
6
6
  "main": "core.mjs",