diff --git a/package-lock.json b/package-lock.json index c9b8131167..72ebb2149e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@fastify/busboy": "^3.0.0", "@firebase/database-compat": "^2.0.0", "@firebase/database-types": "^1.0.6", - "@types/node": "^22.8.7", "farmhash-modern": "^1.1.0", "fast-deep-equal": "^3.1.1", "google-auth-library": "^9.14.2", @@ -36,6 +35,7 @@ "@types/minimist": "^1.2.2", "@types/mocha": "^10.0.0", "@types/nock": "^11.1.0", + "@types/node": "^25.2.0", "@types/request": "^2.47.0", "@types/request-promise": "^4.1.41", "@types/sinon": "^17.0.2", @@ -2191,11 +2191,12 @@ } }, "node_modules/@types/node": { - "version": "22.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", - "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "version": "25.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.0.tgz", + "integrity": "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==", + "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/qs": { @@ -11834,9 +11835,10 @@ } }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "license": "MIT" }, "node_modules/unique-stream": { "version": "2.3.1", diff --git a/package.json b/package.json index 7e7c494da7..c580a508e1 100644 --- a/package.json +++ b/package.json @@ -209,7 +209,6 @@ "@fastify/busboy": "^3.0.0", "@firebase/database-compat": "^2.0.0", "@firebase/database-types": "^1.0.6", - "@types/node": "^22.8.7", "farmhash-modern": "^1.1.0", "fast-deep-equal": "^3.1.1", "google-auth-library": "^9.14.2", @@ -237,6 +236,7 @@ "@types/minimist": "^1.2.2", "@types/mocha": "^10.0.0", "@types/nock": "^11.1.0", + "@types/node": "^25.2.0", "@types/request": "^2.47.0", "@types/request-promise": "^4.1.41", "@types/sinon": "^17.0.2", diff --git a/src/utils/api-request.ts b/src/utils/api-request.ts index a6a578b81c..9616b7a39f 100644 --- a/src/utils/api-request.ts +++ b/src/utils/api-request.ts @@ -733,7 +733,7 @@ class AsyncHttpCall extends AsyncRequestCall { if (!validator.isNonNullObject(this.options.headers)) { this.options.headers = {}; } - this.entity = this.httpConfigImpl.buildEntity(this.options.headers); + this.entity = this.httpConfigImpl.buildEntity(this.options.headers as http.OutgoingHttpHeaders); this.promise = new Promise((resolve, reject) => { this.resolve = resolve; this.reject = reject; @@ -834,7 +834,7 @@ class AsyncHttp2Call extends AsyncRequestCall { if (!validator.isNonNullObject(this.options.headers)) { this.options.headers = {}; } - this.entity = this.http2ConfigImpl.buildEntity(this.options.headers); + this.entity = this.http2ConfigImpl.buildEntity(this.options.headers as http.OutgoingHttpHeaders); this.promise = new Promise((resolve, reject) => { this.resolve = resolve; this.reject = reject; @@ -1354,11 +1354,11 @@ export class Http2SessionHandler { )); }) - http2Session.on('error', (error) => { + http2Session.on('error', (error: any) => { let errorMessage: any; if (error.name == 'AggregateError' && error.errors) { errorMessage = `Session error while making requests: ${error.code} - ${error.name}: ` + - `[${error.errors.map((error: any) => error.message).join(', ')}]` + `[${error.errors.map((e: any) => e.message).join(', ')}]` } else { errorMessage = `Session error while making requests: ${error.code} - ${error.message} ` }