lefthook 1.11.2 → 1.11.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/README.md +30 -26
  2. package/package.json +11 -11
package/README.md CHANGED
@@ -3,12 +3,9 @@
3
3
 
4
4
  # Lefthook
5
5
 
6
- > The fastest polyglot Git hooks manager out there
7
-
8
6
  <img align="right" width="147" height="100" title="Lefthook logo"
9
7
  src="./logo_sign.svg">
10
8
 
11
-
12
9
  A Git hooks manager for Node.js, Ruby, Python and many other types of projects.
13
10
 
14
11
  * **Fast.** It is written in Go. Can run commands in parallel.
@@ -22,12 +19,18 @@ A Git hooks manager for Node.js, Ruby, Python and many other types of projects.
22
19
 
23
20
  ## Install
24
21
 
25
- With **Go** (>= 1.23):
22
+ With **Go** (>= 1.24):
26
23
 
27
24
  ```bash
28
25
  go install github.com/evilmartians/lefthook@latest
29
26
  ```
30
27
 
28
+ * or as a go tool
29
+
30
+ ```bash
31
+ go get -tool github.com/evilmartians/lefthook
32
+ ```
33
+
31
34
  With **NPM**:
32
35
 
33
36
  ```bash
@@ -87,12 +90,14 @@ If you want your own list. [Custom][config-files] and [prebuilt][config-run] exa
87
90
 
88
91
  ```yml
89
92
  pre-commit:
90
- commands:
91
- frontend-linter:
93
+ jobs:
94
+ - name: lint frontend
92
95
  run: yarn eslint {staged_files}
93
- backend-linter:
96
+
97
+ - name: lint backend
94
98
  run: bundle exec rubocop --force-exclusion {all_files}
95
- frontend-style:
99
+
100
+ - name: stylelint frontend
96
101
  files: git diff --name-only HEAD @{push}
97
102
  run: yarn stylelint {files}
98
103
  ```
@@ -102,8 +107,8 @@ If you want to filter list of files. You could find more glob pattern examples [
102
107
 
103
108
  ```yml
104
109
  pre-commit:
105
- commands:
106
- backend-linter:
110
+ jobs:
111
+ - name: lint backend
107
112
  glob: "*.rb" # glob filter
108
113
  exclude: '(^|/)(application|routes)\.rb$' # regexp filter
109
114
  run: bundle exec rubocop --force-exclusion {all_files}
@@ -114,8 +119,8 @@ If you want to execute the commands in a relative path
114
119
 
115
120
  ```yml
116
121
  pre-commit:
117
- commands:
118
- backend-linter:
122
+ jobs:
123
+ - name: lint backend
119
124
  root: "api/" # Careful to have only trailing slash
120
125
  glob: "*.rb" # glob filter
121
126
  run: bundle exec rubocop {all_files}
@@ -127,8 +132,8 @@ If oneline commands are not enough, you can execute files. [docs][config-scripts
127
132
 
128
133
  ```yml
129
134
  commit-msg:
130
- scripts:
131
- "template_checker":
135
+ jobs:
136
+ - script: "template_checker"
132
137
  runner: bash
133
138
  ```
134
139
 
@@ -137,13 +142,14 @@ If you want to control a group of commands. [docs][config-tags]
137
142
 
138
143
  ```yml
139
144
  pre-push:
140
- commands:
141
- packages-audit:
145
+ jobs:
146
+ - name: audit packages
142
147
  tags:
143
148
  - frontend
144
149
  - linters
145
150
  run: yarn lint
146
- gems-audit:
151
+
152
+ - name: audit gems
147
153
  tags:
148
154
  - backend
149
155
  - security
@@ -156,8 +162,8 @@ If you are in the Docker environment. [docs][config-run]
156
162
 
157
163
  ```yml
158
164
  pre-commit:
159
- scripts:
160
- "good_job.js":
165
+ jobs:
166
+ - script: "good_job.js"
161
167
  runner: docker run -it --rm <container_id_or_name> {cmd}
162
168
  ```
163
169
 
@@ -170,8 +176,8 @@ If you a frontend/backend developer and want to skip unnecessary commands or ove
170
176
  pre-push:
171
177
  exclude_tags:
172
178
  - frontend
173
- commands:
174
- packages-audit:
179
+ jobs:
180
+ - name: audit packages
175
181
  skip: true
176
182
  ```
177
183
 
@@ -189,11 +195,9 @@ If you want to run specific group of commands directly.
189
195
 
190
196
  ```yml
191
197
  fixer:
192
- commands:
193
- ruby-fixer:
194
- run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}
195
- js-fixer:
196
- run: yarn eslint --fix {staged_files}
198
+ jobs:
199
+ - run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}
200
+ - run: yarn eslint --fix {staged_files}
197
201
  ```
198
202
  ```bash
199
203
  $ lefthook run fixer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lefthook",
3
- "version": "1.11.2",
3
+ "version": "1.11.4",
4
4
  "description": "Simple git hooks manager",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,16 +28,16 @@
28
28
  },
29
29
  "homepage": "https://github.com/evilmartians/lefthook#readme",
30
30
  "optionalDependencies": {
31
- "lefthook-darwin-arm64": "1.11.2",
32
- "lefthook-darwin-x64": "1.11.2",
33
- "lefthook-linux-arm64": "1.11.2",
34
- "lefthook-linux-x64": "1.11.2",
35
- "lefthook-freebsd-arm64": "1.11.2",
36
- "lefthook-freebsd-x64": "1.11.2",
37
- "lefthook-openbsd-arm64": "1.11.2",
38
- "lefthook-openbsd-x64": "1.11.2",
39
- "lefthook-windows-arm64": "1.11.2",
40
- "lefthook-windows-x64": "1.11.2"
31
+ "lefthook-darwin-arm64": "1.11.4",
32
+ "lefthook-darwin-x64": "1.11.4",
33
+ "lefthook-linux-arm64": "1.11.4",
34
+ "lefthook-linux-x64": "1.11.4",
35
+ "lefthook-freebsd-arm64": "1.11.4",
36
+ "lefthook-freebsd-x64": "1.11.4",
37
+ "lefthook-openbsd-arm64": "1.11.4",
38
+ "lefthook-openbsd-x64": "1.11.4",
39
+ "lefthook-windows-arm64": "1.11.4",
40
+ "lefthook-windows-x64": "1.11.4"
41
41
  },
42
42
  "scripts": {
43
43
  "postinstall": "node postinstall.js"