You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/maintainers_guide.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,27 @@ Maintaining this project requires installing [Node.js](https://nodejs.org). All
8
8
9
9
## ✅ Tasks
10
10
11
+
### 🔧 Git hooks (optional)
12
+
13
+
#### Pre-commit lint hook
14
+
We provide an opt-in Git hook that runs `npm run lint` from the repository root before a commit is created.
15
+
16
+
Enable it once per clone:
17
+
18
+
```sh
19
+
git config core.hooksPath .githooks
20
+
```
21
+
22
+
Disable it:
23
+
24
+
```sh
25
+
git config --unset core.hooksPath
26
+
```
27
+
28
+
Notes:
29
+
- The hook runs `npm run lint` from the repository root.
30
+
- You can skip it with `git commit --no-verify` if needed.
31
+
11
32
### ⚗️ Testing and Linting
12
33
13
34
The Node SDK is made up of multiple, individual packages, each with their own tests. As such, tests are run on a per-package basis. However, the top-level directory contains some development dependencies applicable to all packages. As a result, to run tests for any package, first run `npm install` from the top-level directory. Then run `npm test --workspace packages/<package-name>` to run that package's tests. To run linting across all packages, run `npm run lint` from the root directory.
@@ -21,6 +42,7 @@ npm test --workspace packages/web-api
21
42
22
43
This project has tests for individual packages as `*.test.ts` (or `*.test.js`) files inside of each package's `src` directory. Tests use `node:test` as the test runner and `node:assert/strict` for assertions. Also, for verifying the behavior with the real Slack server-side and developer experience with installed packages, you can run the tests and scripts under `prod-server-integration-tests`. Refer to the README file in the directory for details. These tests are supposed to be run in the project maintainers' manual execution. They are not part of CI builds for now.
23
44
45
+
24
46
Upon opening a PR, tests are executed by GitHub Actions, our continuous integration system. GitHub Actions runs several, more granular builds in order to report on success and failure in a more targeted way.
25
47
26
48
- There is one build for each package on each supported version of Node, as well as one for the integration tests on each supported version of Node.
@@ -55,7 +77,13 @@ Remove cached project dependencies with `rm -r node_modules package-lock.json` b
55
77
56
78
The reference docs for each package is independent of the others. They're generated using the `typedoc` and `typedoc-plugin-markdown` packages with the configurations of the package's `typedoc.json` file.
57
79
58
-
Each package has a script to these generate reference docs. For example:
80
+
Generate reference docs for all packages:
81
+
82
+
```sh
83
+
npm run docs
84
+
```
85
+
86
+
Or generate docs for a specific package. For example:
0 commit comments