Skip to content

Commit c543818

Browse files
swapnil-nagarSwapnil Nagar
and
Swapnil Nagar
authored
Updating the undici Major Version (#350)
* Updating the unDici Major Version * Updating Package Json * Updating Pacakge.lock.json --------- Co-authored-by: Swapnil Nagar <swapnilnagar+microsoft@microsoft.com>
1 parent b50350a commit c543818

File tree

7 files changed

+15
-26
lines changed

7 files changed

+15
-26
lines changed

package-lock.json

Lines changed: 7 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure/functions",
3-
"version": "4.7.2",
3+
"version": "4.7.3",
44
"description": "Microsoft Azure Functions NodeJS Framework",
55
"keywords": [
66
"azure",
@@ -43,7 +43,7 @@
4343
"dependencies": {
4444
"cookie": "^0.7.0",
4545
"long": "^4.0.0",
46-
"undici": "^5.29.0"
46+
"undici": "^7.10.0"
4747
},
4848
"devDependencies": {
4949
"@types/chai": "^4.2.22",

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
export const version = '4.7.2';
4+
export const version = '4.7.3';
55

66
export const returnBindingKey = '$return';

src/http/HttpRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export class HttpRequest implements types.HttpRequest {
9696
}
9797

9898
async formData(): Promise<FormData> {
99+
// eslint-disable-next-line deprecation/deprecation
99100
return this.#uReq.formData();
100101
}
101102

src/http/HttpResponse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export class HttpResponse implements types.HttpResponse {
6363
}
6464

6565
async formData(): Promise<FormData> {
66+
// eslint-disable-next-line deprecation/deprecation
6667
return this.#uRes.formData();
6768
}
6869

src/trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
HttpTrigger,
1414
HttpTriggerOptions,
1515
MySqlTrigger,
16-
MySqlTriggerOptions,
16+
MySqlTriggerOptions,
1717
ServiceBusQueueTrigger,
1818
ServiceBusQueueTriggerOptions,
1919
ServiceBusTopicTrigger,

test/http/HttpRequest.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import 'mocha';
55
import * as chai from 'chai';
66
import { expect } from 'chai';
77
import * as chaiAsPromised from 'chai-as-promised';
8-
import { File } from 'undici';
98
import { HttpRequest } from '../../src/http/HttpRequest';
109

1110
chai.use(chaiAsPromised);
@@ -94,7 +93,7 @@ world
9493

9594
const parsedForm = await req.formData();
9695
expect(parsedForm.has('myfile')).to.equal(true);
97-
const file = <File>parsedForm.get('myfile');
96+
const file = <File>(<unknown>parsedForm.get('myfile'));
9897
expect(file.name).to.equal('test.txt');
9998
expect(file.type).to.equal('text/plain');
10099
expect(await file.text()).to.equal(`hello\r\nworld`);
@@ -135,7 +134,7 @@ value2
135134
const contentTypes = ['application/octet-stream', 'application/json', 'text/plain', 'invalid'];
136135
for (const contentType of contentTypes) {
137136
const req = createFormRequest('', contentType);
138-
await expect(req.formData()).to.eventually.be.rejectedWith(/Could not parse content as FormData/i);
137+
await expect(req.formData()).to.eventually.be.rejectedWith(/Content-Type was not one of /i);
139138
}
140139
});
141140
});

0 commit comments

Comments
 (0)