Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cd68c2b
feat(socket-mode): support undici v8 as a peer dependency
WilliamBergamin Aug 10, 2026
7edc776
docs(ci): condense undici install step comment to one line
WilliamBergamin Aug 10, 2026
4cabd4a
docs(ci): trim undici install step comment
WilliamBergamin Aug 10, 2026
3e6270d
test(socket-mode): simplify undici version guardrail test
WilliamBergamin Aug 10, 2026
7473bef
Merge branch 'main' into expand-undici-support
WilliamBergamin Aug 13, 2026
42ac8ba
Merge branch 'main' into expand-undici-support
WilliamBergamin Aug 19, 2026
f1decb9
Merge branch 'main' into expand-undici-support
WilliamBergamin Aug 27, 2026
7471105
Merge branch 'main' into expand-undici-support
WilliamBergamin Aug 31, 2026
c0746b2
Apply suggestion from @zimeg
WilliamBergamin Aug 31, 2026
623f759
Merge branch 'main' into expand-undici-support
WilliamBergamin Sep 10, 2026
e8462c6
Merge branch 'main' into expand-undici-support
WilliamBergamin Sep 24, 2026
bb11653
fix(socket-mode): pin HTTP/1.1 on undici v8 and test v8 in its own CI…
WilliamBergamin Sep 24, 2026
4d3c1d2
ci: run socket-mode's undici v8 tests as steps in the existing test job
WilliamBergamin Sep 24, 2026
d4e6378
ci: test undici v7 and v8 through the existing matrix
WilliamBergamin Sep 24, 2026
3ebf000
ci: install the matrix's undici major on every job
WilliamBergamin Sep 24, 2026
acb1c81
ci: name the undici matrix entries by their install spec
WilliamBergamin Sep 24, 2026
5108e95
test(socket-mode): drop the ALPN integration test
WilliamBergamin Sep 24, 2026
7e1e685
docs(socket-mode): trim the allowH2 comments
WilliamBergamin Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/socket-mode-undici-v8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@slack/socket-mode": minor
---

Support `undici@^8` as a peer dependency in addition to `undici@^7`. `undici@^8` requires Node.js >=22.19; `undici@^7` continues to support Node.js >=20.

The default dispatcher now pins the WebSocket connection to HTTP/1.1, since `undici@^8` offers HTTP/2 by default. To do the same with a custom `ProxyAgent` dispatcher, pass `requestTls: { allowH2: false }`.
8 changes: 8 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
- "22.x"
- "24.x"
- "26.x"
undici:
- "undici@^7"
- "undici@^8"
exclude:
- node-version: "20.x"
undici: "undici@^8"
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand All @@ -45,6 +51,8 @@ jobs:
npm --version
- name: Install dependencies
run: npm ci --verbose
- name: Install undici
run: npm install ${{ matrix.undici }} --workspace=packages/socket-mode --no-save
- name: Build packages
run: npm run build
- name: Lint
Expand Down
2 changes: 1 addition & 1 deletion packages/socket-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"eventemitter3": "^5"
},
"peerDependencies": {
"undici": "^7.0.0"
"undici": "^7.0.0 || ^8.0.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 praise: Thanks for keeping support consistent!

},
"devDependencies": {
"@types/proxyquire": "^1.3.31",
Expand Down
3 changes: 2 additions & 1 deletion packages/socket-mode/src/SlackWebSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ export class SlackWebSocket {
* leaving no other way to close a stalled peer.
*/
private buildDefaultDispatcher(): Dispatcher {
const baseConnect = buildConnector({});
// undici v8 defaults allowH2 to true; pin HTTP/1.1 so the WebSocket keeps a dedicated socket.
const baseConnect = buildConnector({ allowH2: false });
return new Agent({
connect: (opts, callback) => {
baseConnect(opts, (err, socket) => {
Expand Down
Loading