Skip to content

Commit 6358ed3

Browse files
committed
Merge remote-tracking branch 'origin/main' into node24
# Conflicts: # packages/cli-hooks/package.json # packages/cli-test/package.json # packages/logger/package.json # packages/socket-mode/package.json # packages/webhook/package.json
2 parents 41253ca + 9b23414 commit 6358ed3

33 files changed

Lines changed: 240 additions & 277 deletions

.changeset/grumpy-jobs-poke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/web-api": minor
3+
---
4+
5+
feat: add support for apps.user.connection.update

.claude/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"permissions": {
33
"allow": [
4+
"Bash(cat:*)",
45
"Bash(echo:*)",
56
"Bash(gh issue view:*)",
67
"Bash(gh label list:*)",
@@ -29,6 +30,7 @@
2930
"Bash(npm install)",
3031
"Bash(npm install:*)",
3132
"Bash(npm run build:*)",
33+
"Bash(npm run docs:*)",
3234
"Bash(npm run lint:*)",
3335
"Bash(npm run lint:fix:*)",
3436
"Bash(npm show:*)",

.githooks/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
cd "$(git rev-parse --show-toplevel)" || exit 1
4+
npm run lint

.github/dependabot.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ updates:
6363
patterns:
6464
- "@types/mocha"
6565
- "mocha"
66+
ignore:
67+
- dependency-name: "@types/node"
68+
versions:
69+
- "19.x"
70+
- "20.x"
71+
- "21.x"
72+
- "22.x"
73+
- "23.x"
74+
- "24.x"
75+
- "25.x"
6676
labels:
6777
- "dependencies"
6878
- "javascript"
@@ -91,6 +101,16 @@ updates:
91101
patterns:
92102
- "@types/mocha"
93103
- "mocha"
104+
ignore:
105+
- dependency-name: "@types/node"
106+
versions:
107+
- "19.x"
108+
- "20.x"
109+
- "21.x"
110+
- "22.x"
111+
- "23.x"
112+
- "24.x"
113+
- "25.x"
94114
labels:
95115
- "dependencies"
96116
- "javascript"
@@ -119,6 +139,16 @@ updates:
119139
patterns:
120140
- "@types/mocha"
121141
- "mocha"
142+
ignore:
143+
- dependency-name: "@types/node"
144+
versions:
145+
- "19.x"
146+
- "20.x"
147+
- "21.x"
148+
- "22.x"
149+
- "23.x"
150+
- "24.x"
151+
- "25.x"
122152
labels:
123153
- "dependencies"
124154
- "javascript"
@@ -158,6 +188,16 @@ updates:
158188
patterns:
159189
- "@types/mocha"
160190
- "mocha"
191+
ignore:
192+
- dependency-name: "@types/node"
193+
versions:
194+
- "19.x"
195+
- "20.x"
196+
- "21.x"
197+
- "22.x"
198+
- "23.x"
199+
- "24.x"
200+
- "25.x"
161201
labels:
162202
- "dependencies"
163203
- "javascript"
@@ -178,6 +218,16 @@ updates:
178218
patterns:
179219
- "@types/mocha"
180220
- "mocha"
221+
ignore:
222+
- dependency-name: "@types/node"
223+
versions:
224+
- "19.x"
225+
- "20.x"
226+
- "21.x"
227+
- "22.x"
228+
- "23.x"
229+
- "24.x"
230+
- "25.x"
181231
labels:
182232
- "dependencies"
183233
- "javascript"
@@ -209,6 +259,16 @@ updates:
209259

210260
- package-ecosystem: "npm"
211261
directory: "/"
262+
ignore:
263+
- dependency-name: "@types/node"
264+
versions:
265+
- "19.x"
266+
- "20.x"
267+
- "21.x"
268+
- "22.x"
269+
- "23.x"
270+
- "24.x"
271+
- "25.x"
212272
labels:
213273
- "dependencies"
214274
- "javascript"

.github/maintainers_guide.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@ Maintaining this project requires installing [Node.js](https://nodejs.org). All
88

99
## ✅ Tasks
1010

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+
1132
### ⚗️ Testing and Linting
1233

1334
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
2142

2243
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.
2344

45+
2446
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.
2547

2648
- 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
5577

5678
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.
5779

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:
5987

6088
```sh
6189
npm run docs --workspace packages/web-api

.github/workflows/ci-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
persist-credentials: false
3535
- name: Use Node.js ${{ matrix.node-version }}
36-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
36+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
3737
with:
3838
node-version: ${{ matrix.node-version }}
3939
- name: Check versions
@@ -62,6 +62,8 @@ jobs:
6262
npm run build --workspace=@slack/socket-mode
6363
- name: Lint
6464
run: npm run lint
65+
- name: Build docs
66+
run: npm run docs
6567
- name: Run tests (Node 18/20)
6668
if: matrix.node-version != '22.x' && matrix.node-version != '24.x'
6769
# Node 18 lacks --test-reporter; Node 20 has coverage bugs. Use simpler script.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
persist-credentials: true
2525

2626
- name: Setup Node
27-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
27+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2828
with:
2929
node-version: 24
3030

@@ -57,7 +57,7 @@ jobs:
5757
persist-credentials: true
5858

5959
- name: Setup Node
60-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
60+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
6161
with:
6262
node-version: 24
6363
registry-url: "https://registry.npmjs.org"

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,19 @@
2020
],
2121
"scripts": {
2222
"changeset": "npx @changesets/cli",
23+
"docs": "npm run docs --workspaces --if-present",
2324
"lint": "npx @biomejs/biome check packages",
2425
"lint:fix": "npx @biomejs/biome check --write packages",
2526
"test": "npm test --workspaces --if-present"
2627
},
2728
"devDependencies": {
2829
"@biomejs/biome": "^2.0.5",
29-
"@changesets/cli": "^2.29.8"
30+
"@changesets/cli": "^2.29.8",
31+
"@types/node": "^18.19.130",
32+
"shx": "^0.4.0",
33+
"tsx": "^4.20.6",
34+
"typedoc": "^0.28.7",
35+
"typedoc-plugin-markdown": "^4.7.1",
36+
"typescript": "5.9.3"
3037
}
3138
}

packages/cli-hooks/jsconfig.json

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
11
{
2+
"$schema": "https://json.schemastore.org/jsconfig",
3+
"extends": "../../tsconfig.base.json",
24
"compilerOptions": {
35
"module": "es2022",
4-
"moduleResolution": "node",
5-
"esModuleInterop": true,
6-
"checkJs": true,
7-
8-
"strict": true,
9-
"noUnusedLocals": true,
10-
"noUnusedParameters": true,
11-
"noImplicitReturns": true,
12-
"noFallthroughCasesInSwitch": true,
13-
14-
"baseUrl": ".",
15-
"paths": {
16-
"*": ["./types/*"]
17-
}
6+
"checkJs": true
187
},
19-
"include": ["src/**/*"],
20-
"jsdoc": {
21-
"out": "support/jsdoc",
22-
"access": "public"
23-
}
8+
"include": ["src/**/*"]
249
}

packages/cli-hooks/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@
5454
},
5555
"devDependencies": {
5656
"@types/minimist": "^1.2.5",
57-
"@types/node": "^18.19.130",
5857
"@types/semver": "^7.5.6",
5958
"@types/sinon": "^21.0.0",
60-
"shx": "^0.4.0",
61-
"sinon": "^21.0.0",
62-
"typescript": "5.9.3"
59+
"sinon": "^21.0.0"
6360
}
6461
}

0 commit comments

Comments
 (0)