git-hooks-list 3.2.0 → 4.1.0

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 (3) hide show
  1. package/index.d.ts +44 -0
  2. package/index.js +1 -6
  3. package/package.json +18 -8
package/index.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ type GitHook =
2
+ | 'applypatch-msg'
3
+ | 'pre-applypatch'
4
+ | 'post-applypatch'
5
+ | 'pre-commit'
6
+ | 'pre-merge-commit'
7
+ | 'prepare-commit-msg'
8
+ | 'commit-msg'
9
+ | 'post-commit'
10
+ | 'pre-rebase'
11
+ | 'post-checkout'
12
+ | 'post-merge'
13
+ | 'pre-push'
14
+ | 'pre-receive'
15
+ | 'update'
16
+ | 'proc-receive'
17
+ | 'post-receive'
18
+ | 'post-update'
19
+ | 'reference-transaction'
20
+ | 'push-to-checkout'
21
+ | 'pre-auto-gc'
22
+ | 'post-rewrite'
23
+ | 'sendemail-validate'
24
+ | 'fsmonitor-watchman'
25
+ | 'p4-changelist'
26
+ | 'p4-prepare-changelist'
27
+ | 'p4-post-changelist'
28
+ | 'p4-pre-submit'
29
+ | 'post-index-change'
30
+
31
+ /**
32
+ List of Git hooks.
33
+
34
+ @example
35
+ ```
36
+ import gitHooks from 'git-hooks-list'
37
+
38
+ console.log(gitHooks)
39
+ //=> ['applypatch-msg', 'pre-applypatch', 'post-applypatch', 'pre-commit', …]
40
+ ```
41
+ */
42
+ declare const gitHooks: GitHook[]
43
+
44
+ export default gitHooks
package/index.js CHANGED
@@ -1,6 +1 @@
1
- import fs from 'node:fs'
2
-
3
- const dataFile = new URL('./index.json', import.meta.url)
4
- const gitHooks = JSON.parse(fs.readFileSync(dataFile))
5
-
6
- export default gitHooks
1
+ export {default} from './index.json' with {type: 'json'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-hooks-list",
3
- "version": "3.2.0",
3
+ "version": "4.1.0",
4
4
  "description": "List of Git hooks",
5
5
  "keywords": [
6
6
  "git",
@@ -22,14 +22,19 @@
22
22
  "sideEffects": false,
23
23
  "type": "module",
24
24
  "exports": {
25
- "require": "./index.json",
26
- "default": "./index.js"
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "require": "./index.json",
28
+ "default": "./index.js"
29
+ },
30
+ "./*": "./*"
27
31
  },
28
32
  "main": "index.json",
29
33
  "jsdelivr": "index.json",
30
34
  "unpkg": "index.json",
31
35
  "browser": "index.json",
32
36
  "files": [
37
+ "index.d.ts",
33
38
  "index.json",
34
39
  "index.js"
35
40
  ],
@@ -37,7 +42,7 @@
37
42
  "clean": "run-p \"clean:*\"",
38
43
  "clean:dist": "del-cli dist",
39
44
  "dist": "run-p \"dist:*\"",
40
- "dist:npm": "np --yolo --no-yarn",
45
+ "dist:npm": "release-it",
41
46
  "fix": "run-p \"fix:*\"",
42
47
  "fix:eslint": "yarn lint:eslint --fix",
43
48
  "fix:markdown": "markdownlint-cli2 --fix",
@@ -48,7 +53,7 @@
48
53
  "lint:markdown": "markdownlint-cli2",
49
54
  "lint:package-json": "yarn run fix:package-json --check",
50
55
  "lint:prettier": "prettier . --check",
51
- "prepare": "husky install",
56
+ "prepare": "husky",
52
57
  "release": "run-s lint test fix dist",
53
58
  "test": "ava",
54
59
  "test-coverage": "c8 yarn test",
@@ -58,6 +63,9 @@
58
63
  "verbose": true
59
64
  },
60
65
  "c8": {
66
+ "include": [
67
+ "index.js"
68
+ ],
61
69
  "reporter": [
62
70
  "text",
63
71
  "lcov"
@@ -73,13 +81,15 @@
73
81
  "c8": "10.1.3",
74
82
  "cheerio": "1.0.0",
75
83
  "del-cli": "6.0.0",
76
- "eslint": "9.19.0",
84
+ "eslint": "9.22.0",
77
85
  "husky": "9.1.7",
78
86
  "lint-staged": "15.4.3",
79
87
  "markdownlint-cli2": "0.17.2",
80
88
  "npm-run-all2": "7.0.2",
81
- "prettier": "3.4.2",
82
- "sort-package-json": "2.14.0",
89
+ "outdent": "0.8.0",
90
+ "prettier": "3.5.3",
91
+ "release-it": "18.1.2",
92
+ "sort-package-json": "3.0.0",
83
93
  "write-prettier-file": "3.0.3"
84
94
  },
85
95
  "packageManager": "yarn@4.6.0",