@digitoimistodude/code-quality-checks 2.1.6 → 2.1.8

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/.husky/commit-msg CHANGED
@@ -101,7 +101,7 @@ if [ -f "$commit_msg_file" ]; then
101
101
  if [ "$uncommitted_files" -gt 0 ]; then
102
102
  local msg="• You have $uncommitted_files uncommitted files"
103
103
  local msg_len=${#msg}
104
- local padding=$((56 - msg_len))
104
+ local padding=$((57 - msg_len))
105
105
  echo "${GREEN}║${NC} ${GREEN}${msg}${NC}$(printf '%*s' $padding '')${GREEN}║${NC}"
106
106
  fi
107
107
 
@@ -119,7 +119,7 @@ if [ -f "$commit_msg_file" ]; then
119
119
  day_of_week=$(date +%u) # 1=Monday, 7=Sunday
120
120
  hour_of_day=$(date +%H)
121
121
  if [ "$day_of_week" -eq 5 ] && [ "$hour_of_day" -ge 15 ]; then
122
- echo "${GREEN}║${NC} ${GREEN}⚠️ Friday afternoon - defer non-critical deploys${NC}$(printf '%*s' 8 '')${GREEN}║${NC}"
122
+ echo "${GREEN}║${NC} ${GREEN}⚠️ Friday afternoon - defer non-critical deploys${NC}$(printf '%*s' 1 '')${GREEN}║${NC}"
123
123
  fi
124
124
 
125
125
  echo "$bottom"
package/.husky/pre-commit CHANGED
@@ -1,8 +1,15 @@
1
1
  # Pre commit hooks for Dude projects
2
2
  # Ref: DEV-177, DEV-373, DEV-623
3
3
 
4
- # Version:
5
- VERSION="2.1.6 (2026-01-15)"
4
+ # Version: dynamically read from CHANGELOG.md
5
+ if [ -f "CHANGELOG.md" ]; then
6
+ CHANGELOG_LINE=$(head -n 1 CHANGELOG.md)
7
+ VERSION_NUM=$(echo "$CHANGELOG_LINE" | sed 's/### //' | sed 's/:.*//')
8
+ VERSION_DATE=$(echo "$CHANGELOG_LINE" | sed 's/.*: //')
9
+ VERSION="$VERSION_NUM ($VERSION_DATE)"
10
+ else
11
+ VERSION="unknown"
12
+ fi
6
13
 
7
14
  # Load configuration
8
15
  # First check for local project config, then fall back to package default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitoimistodude/code-quality-checks",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "Code quality definitions and Husky pre-commit hooks for Dude WordPress projects",
5
5
  "main": "index.js",
6
6
  "scripts": {