Skip to content

Commit 3b27c85

Browse files
chore(deps): update dependency typescript to v5.9.3 (scaleway#2616)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Remy <jremy@scaleway.com>
1 parent 744a1a2 commit 3b27c85

File tree

6 files changed

+62
-50
lines changed

6 files changed

+62
-50
lines changed

examples/nodejs-minimal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
},
1616
"devDependencies": {
1717
"@types/node": "20.19.25",
18-
"typescript": "5.8.3"
18+
"typescript": "5.9.3"
1919
}
2020
}

examples/serverless-function-minimal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"devDependencies": {
1616
"serverless-scaleway-functions": "0.4.17",
1717
"@types/node": "20.19.25",
18-
"typescript": "5.8.3"
18+
"typescript": "5.9.3"
1919
}
2020
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"tsc-alias": "^1.8.16",
8484
"typedoc": "0.28.14",
8585
"turbo": "^2.6.1",
86-
"typescript": "5.8.3",
86+
"typescript": "5.9.3",
8787
"vite": "6.4.1",
8888
"vitest": "3.1.2"
8989
},

packages/client/src/scw/fetch/__tests__/http-dumper.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const makeFetchResponse = (
4646
contentType: string,
4747
status: number,
4848
): Response =>
49-
new Response(convertObjToBuffer(value), {
49+
new Response(new Uint8Array(convertObjToBuffer(value)), {
5050
headers: { 'Content-Type': contentType },
5151
status,
5252
})

packages/client/src/scw/fetch/__tests__/response-parser.test.ts

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ const makeResponse = (
2020
status = 200,
2121
contentType: string | undefined = undefined,
2222
) =>
23-
new Response(value !== null ? convertObjToBuffer(value) : value, {
24-
headers: contentType ? { 'Content-Type': contentType } : undefined,
25-
status,
26-
})
23+
new Response(
24+
value !== null ? new Uint8Array(convertObjToBuffer(value)) : value,
25+
{
26+
headers: contentType ? { 'Content-Type': contentType } : undefined,
27+
status,
28+
},
29+
)
2730

2831
const makeJSONResponse = (
2932
value: JSONObject | null = SIMPLE_REQ_BODY,
@@ -54,30 +57,39 @@ describe(`responseParser`, () => {
5457
).rejects.toThrow(new TypeError('Invalid response object')))
5558

5659
it(`triggers an error for invalid status code`, async () => {
57-
const invalidResponse = new Response(convertObjToBuffer(SIMPLE_REQ_BODY), {
58-
headers: { 'Content-Type': 'application/json' },
59-
status: 500,
60-
})
60+
const invalidResponse = new Response(
61+
new Uint8Array(convertObjToBuffer(SIMPLE_REQ_BODY)),
62+
{
63+
headers: { 'Content-Type': 'application/json' },
64+
status: 500,
65+
},
66+
)
6167

6268
return expect(parseJson(invalidResponse)).rejects.toThrow()
6369
})
6470

6571
it(`triggers an error with string payload`, async () => {
66-
const invalidResponse = new Response(convertObjToBuffer('random-error'), {
67-
headers: { 'Content-Type': 'application/json' },
68-
status: 500,
69-
})
72+
const invalidResponse = new Response(
73+
new Uint8Array(convertObjToBuffer('random-error')),
74+
{
75+
headers: { 'Content-Type': 'application/json' },
76+
status: 500,
77+
},
78+
)
7079

7180
return expect(parseJson(invalidResponse)).rejects.toThrow(
7281
new ScalewayError(500, 'random-error'),
7382
)
7483
})
7584

7685
it(`triggers an error with unknown payload`, async () => {
77-
const invalidResponse = new Response(convertObjToBuffer(null), {
78-
headers: { 'Content-Type': 'application/json' },
79-
status: 500,
80-
})
86+
const invalidResponse = new Response(
87+
new Uint8Array(convertObjToBuffer(null)),
88+
{
89+
headers: { 'Content-Type': 'application/json' },
90+
status: 500,
91+
},
92+
)
8193

8294
return expect(parseJson(invalidResponse)).rejects.toThrow(
8395
new ScalewayError(500, 'cannot read error response body'),

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)