From 519859a8b673e76d8a896b94b67731b7a37dd628 Mon Sep 17 00:00:00 2001 From: Swapnil Nagar Date: Wed, 4 Jun 2025 10:55:13 -0700 Subject: [PATCH 1/3] Updating the unDici Major Version --- src/constants.ts | 2 +- src/http/HttpRequest.ts | 1 + src/http/HttpResponse.ts | 1 + src/trigger.ts | 2 +- test/http/HttpRequest.test.ts | 5 ++--- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index c453818..1d45966 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. -export const version = '4.7.2'; +export const version = '4.7.3'; export const returnBindingKey = '$return'; diff --git a/src/http/HttpRequest.ts b/src/http/HttpRequest.ts index 7e0ab8f..f19df17 100644 --- a/src/http/HttpRequest.ts +++ b/src/http/HttpRequest.ts @@ -96,6 +96,7 @@ export class HttpRequest implements types.HttpRequest { } async formData(): Promise { + // eslint-disable-next-line deprecation/deprecation return this.#uReq.formData(); } diff --git a/src/http/HttpResponse.ts b/src/http/HttpResponse.ts index 120dc1a..a71d43c 100644 --- a/src/http/HttpResponse.ts +++ b/src/http/HttpResponse.ts @@ -63,6 +63,7 @@ export class HttpResponse implements types.HttpResponse { } async formData(): Promise { + // eslint-disable-next-line deprecation/deprecation return this.#uRes.formData(); } diff --git a/src/trigger.ts b/src/trigger.ts index f709abb..ed2f7f6 100644 --- a/src/trigger.ts +++ b/src/trigger.ts @@ -13,7 +13,7 @@ import { HttpTrigger, HttpTriggerOptions, MySqlTrigger, - MySqlTriggerOptions, + MySqlTriggerOptions, ServiceBusQueueTrigger, ServiceBusQueueTriggerOptions, ServiceBusTopicTrigger, diff --git a/test/http/HttpRequest.test.ts b/test/http/HttpRequest.test.ts index 23cddba..698135d 100644 --- a/test/http/HttpRequest.test.ts +++ b/test/http/HttpRequest.test.ts @@ -5,7 +5,6 @@ import 'mocha'; import * as chai from 'chai'; import { expect } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; -import { File } from 'undici'; import { HttpRequest } from '../../src/http/HttpRequest'; chai.use(chaiAsPromised); @@ -94,7 +93,7 @@ world const parsedForm = await req.formData(); expect(parsedForm.has('myfile')).to.equal(true); - const file = parsedForm.get('myfile'); + const file = (parsedForm.get('myfile')); expect(file.name).to.equal('test.txt'); expect(file.type).to.equal('text/plain'); expect(await file.text()).to.equal(`hello\r\nworld`); @@ -135,7 +134,7 @@ value2 const contentTypes = ['application/octet-stream', 'application/json', 'text/plain', 'invalid']; for (const contentType of contentTypes) { const req = createFormRequest('', contentType); - await expect(req.formData()).to.eventually.be.rejectedWith(/Could not parse content as FormData/i); + await expect(req.formData()).to.eventually.be.rejectedWith(/Content-Type was not one of /i); } }); }); From caaee390d55a86e9f5c6656361170f69d062722a Mon Sep 17 00:00:00 2001 From: Swapnil Nagar Date: Thu, 5 Jun 2025 12:38:54 -0700 Subject: [PATCH 2/3] Updating Package Json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dabaf9c..718da4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@azure/functions", - "version": "4.7.2", + "version": "4.7.3", "description": "Microsoft Azure Functions NodeJS Framework", "keywords": [ "azure", @@ -43,7 +43,7 @@ "dependencies": { "cookie": "^0.7.0", "long": "^4.0.0", - "undici": "^5.29.0" + "undici": "^7.10.0" }, "devDependencies": { "@types/chai": "^4.2.22", From 0197fe1b95da9534ff3fcf099b5248065af4b908 Mon Sep 17 00:00:00 2001 From: Swapnil Nagar Date: Thu, 5 Jun 2025 13:43:47 -0700 Subject: [PATCH 3/3] Updating Pacakge.lock.json --- package-lock.json | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index b620ce1..4f216eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@azure/functions", - "version": "4.7.2", + "version": "4.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@azure/functions", - "version": "4.7.2", + "version": "4.7.3", "license": "MIT", "dependencies": { "cookie": "^0.7.0", "long": "^4.0.0", - "undici": "^5.29.0" + "undici": "^7.10.0" }, "devDependencies": { "@types/chai": "^4.2.22", @@ -239,15 +239,6 @@ "node": ">= 4" } }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "license": "MIT", - "engines": { - "node": ">=14" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", @@ -6448,15 +6439,12 @@ } }, "node_modules/undici": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", - "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.10.0.tgz", + "integrity": "sha512-u5otvFBOBZvmdjWLVW+5DAc9Nkq8f24g0O9oY7qw2JVIF1VocIFoyz9JFkuVOS2j41AufeO0xnlweJ2RLT8nGw==", "license": "MIT", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, "engines": { - "node": ">=14.0" + "node": ">=20.18.1" } }, "node_modules/undici-types": {