jettypod 4.2.3 → 4.2.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.
Files changed (2) hide show
  1. package/jettypod.js +44 -0
  2. package/package.json +1 -1
package/jettypod.js CHANGED
@@ -16,6 +16,44 @@ try {
16
16
  GIT_ROOT = process.cwd();
17
17
  }
18
18
 
19
+ /**
20
+ * Ensure .claude/session.md is gitignored and untracked
21
+ * Called during init and update to fix existing projects
22
+ */
23
+ function ensureSessionFileGitignored() {
24
+ const gitignorePath = path.join(process.cwd(), '.gitignore');
25
+ const sessionEntry = '.claude/session.md';
26
+
27
+ // Add to .gitignore if not present
28
+ let gitignoreContent = '';
29
+ if (fs.existsSync(gitignorePath)) {
30
+ gitignoreContent = fs.readFileSync(gitignorePath, 'utf-8');
31
+ }
32
+
33
+ if (!gitignoreContent.includes(sessionEntry)) {
34
+ const newEntry = gitignoreContent.endsWith('\n') || gitignoreContent === ''
35
+ ? `${sessionEntry}\n`
36
+ : `\n${sessionEntry}\n`;
37
+ fs.appendFileSync(gitignorePath, newEntry);
38
+ }
39
+
40
+ // Untrack session.md if it's currently tracked
41
+ try {
42
+ const { execSync } = require('child_process');
43
+ // Check if file is tracked
44
+ execSync(`git ls-files --error-unmatch .claude/session.md 2>/dev/null`, {
45
+ encoding: 'utf-8',
46
+ stdio: ['pipe', 'pipe', 'pipe']
47
+ });
48
+
49
+ // If we get here, file is tracked - untrack it
50
+ execSync('git rm --cached .claude/session.md', { stdio: 'pipe' });
51
+ console.log('📝 Untracked .claude/session.md (now gitignored)');
52
+ } catch (e) {
53
+ // File not tracked or git error - that's fine
54
+ }
55
+ }
56
+
19
57
  // CLAUDE.md generation
20
58
  const claude = {
21
59
  async generate(config, options = {}) {
@@ -617,6 +655,9 @@ async function initializeProject() {
617
655
  fs.mkdirSync('.claude', { recursive: true });
618
656
  }
619
657
 
658
+ // Ensure .claude/session.md is gitignored and untracked
659
+ ensureSessionFileGitignored();
660
+
620
661
  const claudeSettingsPath = path.join('.claude', 'settings.json');
621
662
  if (!fs.existsSync(claudeSettingsPath)) {
622
663
  const claudeSettings = {
@@ -989,6 +1030,9 @@ switch (command) {
989
1030
  console.error(`❌ Could not refresh skills: ${err.message}`);
990
1031
  }
991
1032
  }
1033
+
1034
+ // Ensure session.md is gitignored (fixes existing projects)
1035
+ ensureSessionFileGitignored();
992
1036
  }
993
1037
 
994
1038
  process.exit(success ? 0 : 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jettypod",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
4
4
  "description": "AI-powered development workflow manager with TDD, BDD, and automatic test generation",
5
5
  "main": "jettypod.js",
6
6
  "bin": {