@digitoimistodude/code-quality-checks 2.1.9 → 2.1.10

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/.husky/pre-commit +25 -1
  2. package/package.json +1 -1
package/.husky/pre-commit CHANGED
@@ -602,6 +602,30 @@ if [ "$CONTEXT" = "standalone" ]; then
602
602
  echo "${GREEN}${CHECK} OK${NC}"
603
603
  fi
604
604
 
605
+ # Check for newer version of code-quality-checks
606
+ printf " ${ARROW} Checking for code-quality-checks updates... "
607
+ current_version=$(grep '"version":' "$(npm root -g 2>/dev/null || echo node_modules)/@digitoimistodude/code-quality-checks/package.json" 2>/dev/null | head -1 | sed 's/.*"version": "\(.*\)".*/\1/' || echo "")
608
+ if [ -z "$current_version" ]; then
609
+ # Try local node_modules if global not found
610
+ current_version=$(grep '"version":' "node_modules/@digitoimistodude/code-quality-checks/package.json" 2>/dev/null | head -1 | sed 's/.*"version": "\(.*\)".*/\1/' || echo "unknown")
611
+ fi
612
+
613
+ if [ "$current_version" != "unknown" ]; then
614
+ # Check npm for latest version with 2 second timeout
615
+ latest_version=$(timeout 2s npm view @digitoimistodude/code-quality-checks version 2>/dev/null || echo "")
616
+
617
+ if [ -n "$latest_version" ] && [ "$current_version" != "$latest_version" ]; then
618
+ echo "${YELLOW}⚠️ UPDATE AVAILABLE${NC}"
619
+ echo " ${YELLOW}Current: $current_version | Latest: $latest_version${NC}"
620
+ echo " ${YELLOW}Update with: ${BLUE}npm install -g @digitoimistodude/code-quality-checks@latest${NC}"
621
+ else
622
+ echo "${GREEN}${CHECK} OK${NC}"
623
+ fi
624
+ else
625
+ echo "${YELLOW}⚠️ SKIPPED${NC}"
626
+ echo " ${YELLOW}Could not determine current version${NC}"
627
+ fi
628
+
605
629
  echo ""
606
630
  echo "${CYAN}${SEARCH} Checking staged files for issues...${NC}"
607
631
 
@@ -763,7 +787,7 @@ if [ -n "$scss_files" ]; then
763
787
  echo "${GREEN}${CHECK} OK${NC}"
764
788
  else
765
789
  echo "${YELLOW}⚠️ SKIPPED${NC}"
766
- echo " ${YELLOW}No SCSS files in theme directory${NC}"
790
+ echo " ${YELLOW}No staged SCSS files found in theme directory ($theme_prefix)${NC}"
767
791
  fi
768
792
  else
769
793
  # Standalone: run from current directory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitoimistodude/code-quality-checks",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "Code quality definitions and Husky pre-commit hooks for Dude WordPress projects",
5
5
  "main": "index.js",
6
6
  "scripts": {