git-slot-machine 2.3.0 → 2.3.1

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
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.3.1] - 2026-03-11
9
+
10
+ ### Fixed
11
+ - Post-commit hook now suppresses animation frames when running under Claude Code (`CLAUDECODE=1`)
12
+ - Game still plays, balance updates, and API syncs normally
13
+ - Only the final result line is shown, saving LLM context tokens
14
+ - Normal terminal usage is completely unchanged
15
+
16
+ ## [2.3.0] - 2025-12-17
17
+
18
+ ### Added
19
+ - ???
20
+
8
21
  ## [2.2.0] - 2025-10-23
9
22
 
10
23
  ### Added
@@ -1,2 +1,2 @@
1
- export declare const POST_COMMIT_HOOK = "#!/bin/sh\n# Git Slot Machine post-commit hook\n\n# Get the commit hash\nHASH=$(git rev-parse --short=7 HEAD)\n\n# Check if git-slot-machine is installed\nif command -v git-slot-machine >/dev/null 2>&1; then\n git-slot-machine play \"$HASH\" --small\nelif [ -f \"./node_modules/.bin/git-slot-machine\" ]; then\n ./node_modules/.bin/git-slot-machine play \"$HASH\" --small\nelse\n echo \"git-slot-machine not found, skipping animation\"\nfi\n";
1
+ export declare const POST_COMMIT_HOOK = "#!/bin/sh\n# Git Slot Machine post-commit hook\n\n# Get the commit hash\nHASH=$(git rev-parse --short=7 HEAD)\n\n# Find git-slot-machine binary\nif command -v git-slot-machine >/dev/null 2>&1; then\n GSM=git-slot-machine\nelif [ -f \"./node_modules/.bin/git-slot-machine\" ]; then\n GSM=./node_modules/.bin/git-slot-machine\nelse\n echo \"git-slot-machine not found, skipping animation\"\n exit 0\nfi\n\n# In Claude Code, skip animation frames and show only the result line\nif [ -n \"$CLAUDECODE\" ]; then\n \"$GSM\" play \"$HASH\" --small 2>/dev/null | tail -1\nelse\n \"$GSM\" play \"$HASH\" --small\nfi\n";
2
2
  //# sourceMappingURL=post-commit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"post-commit.d.ts","sourceRoot":"","sources":["../../src/templates/post-commit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,icAc5B,CAAC"}
1
+ {"version":3,"file":"post-commit.d.ts","sourceRoot":"","sources":["../../src/templates/post-commit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,2mBAsB5B,CAAC"}
@@ -4,13 +4,21 @@ export const POST_COMMIT_HOOK = `#!/bin/sh
4
4
  # Get the commit hash
5
5
  HASH=$(git rev-parse --short=7 HEAD)
6
6
 
7
- # Check if git-slot-machine is installed
7
+ # Find git-slot-machine binary
8
8
  if command -v git-slot-machine >/dev/null 2>&1; then
9
- git-slot-machine play "$HASH" --small
9
+ GSM=git-slot-machine
10
10
  elif [ -f "./node_modules/.bin/git-slot-machine" ]; then
11
- ./node_modules/.bin/git-slot-machine play "$HASH" --small
11
+ GSM=./node_modules/.bin/git-slot-machine
12
12
  else
13
13
  echo "git-slot-machine not found, skipping animation"
14
+ exit 0
15
+ fi
16
+
17
+ # In Claude Code, skip animation frames and show only the result line
18
+ if [ -n "$CLAUDECODE" ]; then
19
+ "$GSM" play "$HASH" --small 2>/dev/null | tail -1
20
+ else
21
+ "$GSM" play "$HASH" --small
14
22
  fi
15
23
  `;
16
24
  //# sourceMappingURL=post-commit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"post-commit.js","sourceRoot":"","sources":["../../src/templates/post-commit.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;CAc/B,CAAC"}
1
+ {"version":3,"file":"post-commit.js","sourceRoot":"","sources":["../../src/templates/post-commit.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-slot-machine",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Turn your git commits into a slot machine game! CLI tool with global leaderboards and win streaks.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4,12 +4,20 @@ export const POST_COMMIT_HOOK = `#!/bin/sh
4
4
  # Get the commit hash
5
5
  HASH=$(git rev-parse --short=7 HEAD)
6
6
 
7
- # Check if git-slot-machine is installed
7
+ # Find git-slot-machine binary
8
8
  if command -v git-slot-machine >/dev/null 2>&1; then
9
- git-slot-machine play "$HASH" --small
9
+ GSM=git-slot-machine
10
10
  elif [ -f "./node_modules/.bin/git-slot-machine" ]; then
11
- ./node_modules/.bin/git-slot-machine play "$HASH" --small
11
+ GSM=./node_modules/.bin/git-slot-machine
12
12
  else
13
13
  echo "git-slot-machine not found, skipping animation"
14
+ exit 0
15
+ fi
16
+
17
+ # In Claude Code, skip animation frames and show only the result line
18
+ if [ -n "$CLAUDECODE" ]; then
19
+ "$GSM" play "$HASH" --small 2>/dev/null | tail -1
20
+ else
21
+ "$GSM" play "$HASH" --small
14
22
  fi
15
23
  `;