@p8ec/shared 3.0.3 → 3.0.5

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.
@@ -2,7 +2,7 @@
2
2
  # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
3
3
 
4
4
  ### Pre-commit hook ###
5
- # 1. Block commits to main, master, and release branches
5
+ # 1. Block commits to main, master, and release branches, except for specific files
6
6
  pre-commit:
7
7
  commands:
8
8
  git:
@@ -15,14 +15,14 @@ pre-commit:
15
15
  exit 0
16
16
  fi
17
17
 
18
- ALLOWED_FILES=${ALLOWED_FILES:-"package.json"}
18
+ ALLOWED_FILES=${ALLOWED_FILES:-"package.json,.idea/*"}
19
19
  IFS=',' read -r -a ALLOWED_ARRAY <<< "$ALLOWED_FILES"
20
20
 
21
21
  # Check every staged file; if any differs from the allowed files, block the commit
22
- for f in $STAGED_FILES; do
22
+ while IFS= read -r f; do
23
23
  MATCHED=false
24
24
  for allowed in "${ALLOWED_ARRAY[@]}"; do
25
- if [[ "$f" == "$allowed" || "$f" == */"$allowed" ]]; then
25
+ if [[ "$f" == "$allowed" || "$f" == */"$allowed" || "$f" == $allowed ]]; then
26
26
  MATCHED=true
27
27
  break
28
28
  fi
@@ -32,10 +32,9 @@ pre-commit:
32
32
  echo "Direct commits to main, master, and release branches are not allowed, except for: $ALLOWED_FILES"
33
33
  exit 1
34
34
  fi
35
- done
35
+ done <<< "$STAGED_FILES"
36
36
  fi
37
37
 
38
-
39
38
  ### Commit message hook ###
40
39
  # 1. Allow only commit messages that follow a conventional commit format
41
40
  commit-msg:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@p8ec/shared",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "P(8) Global Shared Library for Javascript",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,13 +36,13 @@
36
36
  "types": "dist/types/index.d.ts",
37
37
  "license": "MIT",
38
38
  "dependencies": {
39
- "@eslint/js": "^9.39.2",
40
- "eslint": "^9.39.2",
39
+ "@eslint/js": "^10.0.1",
40
+ "eslint": "^10.0.1",
41
41
  "eslint-config-prettier": "^10.1.8",
42
- "eslint-plugin-headers": "^1.3.3",
43
- "eslint-plugin-prettier": "^5.5.4",
42
+ "eslint-plugin-headers": "^1.3.4",
43
+ "eslint-plugin-prettier": "^5.5.5",
44
44
  "ferramenta": "^1.3.2",
45
- "prettier": "^3.7.4",
46
- "typescript-eslint": "^8.52.0"
45
+ "prettier": "^3.8.1",
46
+ "typescript-eslint": "^8.56.0"
47
47
  }
48
48
  }