Skip to content

Commit

Permalink
Upgrade Undici from 6 to 7 (#203)
Browse files Browse the repository at this point in the history
* Upgrade Undici from 6 to 7

* Clean up faulty backport config
  • Loading branch information
JoshMock authored Jan 17, 2025
1 parent 110977f commit 554f1c6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 35 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
---
name: Backport
on:
pull_request:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-latest
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- name: Backport
uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 0 additions & 27 deletions backport.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"ms": "^2.1.3",
"secure-json-parse": "^3.0.1",
"tslib": "^2.8.1",
"undici": "^6.21.0"
"undici": "^7.2.3"
},
"tap": {
"files": [
Expand Down
5 changes: 2 additions & 3 deletions src/connection/UndiciConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import BaseConnection, {
isCaFingerprintMatch,
isBinary
} from './BaseConnection'
import { Pool, buildConnector, Dispatcher } from 'undici'
import { Pool, buildConnector } from 'undici'
import {
ConfigurationError,
RequestAbortedError,
Expand Down Expand Up @@ -165,8 +165,7 @@ export default class Connection extends BaseConnection {
debug('Starting a new request', params)
let response
try {
// @ts-expect-error method it's fine as string
response = (await this.pool.request(requestParams)) as Dispatcher.ResponseData
response = await this.pool.request(requestParams)
if (timeoutId != null) clearTimeout(timeoutId)
} catch (err: any) {
if (timeoutId != null) clearTimeout(timeoutId)
Expand Down

0 comments on commit 554f1c6

Please sign in to comment.