lefthook 1.11.2 → 1.11.3

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 +23 -25
  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.
@@ -87,12 +84,14 @@ If you want your own list. [Custom][config-files] and [prebuilt][config-run] exa
87
84
 
88
85
  ```yml
89
86
  pre-commit:
90
- commands:
91
- frontend-linter:
87
+ jobs:
88
+ - name: lint frontend
92
89
  run: yarn eslint {staged_files}
93
- backend-linter:
90
+
91
+ - name: lint backend
94
92
  run: bundle exec rubocop --force-exclusion {all_files}
95
- frontend-style:
93
+
94
+ - name: stylelint frontend
96
95
  files: git diff --name-only HEAD @{push}
97
96
  run: yarn stylelint {files}
98
97
  ```
@@ -102,8 +101,8 @@ If you want to filter list of files. You could find more glob pattern examples [
102
101
 
103
102
  ```yml
104
103
  pre-commit:
105
- commands:
106
- backend-linter:
104
+ jobs:
105
+ - name: lint backend
107
106
  glob: "*.rb" # glob filter
108
107
  exclude: '(^|/)(application|routes)\.rb$' # regexp filter
109
108
  run: bundle exec rubocop --force-exclusion {all_files}
@@ -114,8 +113,8 @@ If you want to execute the commands in a relative path
114
113
 
115
114
  ```yml
116
115
  pre-commit:
117
- commands:
118
- backend-linter:
116
+ jobs:
117
+ - name: lint backend
119
118
  root: "api/" # Careful to have only trailing slash
120
119
  glob: "*.rb" # glob filter
121
120
  run: bundle exec rubocop {all_files}
@@ -127,8 +126,8 @@ If oneline commands are not enough, you can execute files. [docs][config-scripts
127
126
 
128
127
  ```yml
129
128
  commit-msg:
130
- scripts:
131
- "template_checker":
129
+ jobs:
130
+ - script: "template_checker"
132
131
  runner: bash
133
132
  ```
134
133
 
@@ -137,13 +136,14 @@ If you want to control a group of commands. [docs][config-tags]
137
136
 
138
137
  ```yml
139
138
  pre-push:
140
- commands:
141
- packages-audit:
139
+ jobs:
140
+ - name: audit packages
142
141
  tags:
143
142
  - frontend
144
143
  - linters
145
144
  run: yarn lint
146
- gems-audit:
145
+
146
+ - name: audit gems
147
147
  tags:
148
148
  - backend
149
149
  - security
@@ -156,8 +156,8 @@ If you are in the Docker environment. [docs][config-run]
156
156
 
157
157
  ```yml
158
158
  pre-commit:
159
- scripts:
160
- "good_job.js":
159
+ jobs:
160
+ - script: "good_job.js"
161
161
  runner: docker run -it --rm <container_id_or_name> {cmd}
162
162
  ```
163
163
 
@@ -170,8 +170,8 @@ If you a frontend/backend developer and want to skip unnecessary commands or ove
170
170
  pre-push:
171
171
  exclude_tags:
172
172
  - frontend
173
- commands:
174
- packages-audit:
173
+ jobs:
174
+ - name: audit packages
175
175
  skip: true
176
176
  ```
177
177
 
@@ -189,11 +189,9 @@ If you want to run specific group of commands directly.
189
189
 
190
190
  ```yml
191
191
  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}
192
+ jobs:
193
+ - run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}
194
+ - run: yarn eslint --fix {staged_files}
197
195
  ```
198
196
  ```bash
199
197
  $ 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.3",
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.3",
32
+ "lefthook-darwin-x64": "1.11.3",
33
+ "lefthook-linux-arm64": "1.11.3",
34
+ "lefthook-linux-x64": "1.11.3",
35
+ "lefthook-freebsd-arm64": "1.11.3",
36
+ "lefthook-freebsd-x64": "1.11.3",
37
+ "lefthook-openbsd-arm64": "1.11.3",
38
+ "lefthook-openbsd-x64": "1.11.3",
39
+ "lefthook-windows-arm64": "1.11.3",
40
+ "lefthook-windows-x64": "1.11.3"
41
41
  },
42
42
  "scripts": {
43
43
  "postinstall": "node postinstall.js"