Skip to content

Commit 519859a

Browse files
author
Swapnil Nagar
committed
Updating the unDici Major Version
1 parent b50350a commit 519859a

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

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)