Skip to content

Commit f4e0893

Browse files
authored
deps: update "aws-sdk" to v2.1692.0 #6340
## Problem The version of the AWSK SDK v2 was outdated 1.5 years, so some newer functionality was not available. ## Solution Update the version of `aws-sdk` package to the latest version. The `Response` class in AWS SDK changed the signature of the `nextPage` method, so some tests that were mocking this method had to be updated accordingly (changing the response from `undefined` to `null`). The definition changed from ``` nextPage(callback?: (err: E, data: D) => void): Request<D, E>|void; ``` (callback optional, can return `void`) To ``` nextPage(): Request<D, E> | null; nextPage(callback: (err: E, data: D) => void): void; ``` (can return `null` if no callback. only when a callback is passed returns `void`)
1 parent e11c27d commit f4e0893

File tree

5 files changed

+16
-24
lines changed

5 files changed

+16
-24
lines changed

package-lock.json

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

packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const buildMockListCodeScanFindingsResponse = (
5353
): Awaited<Promise<PromiseResult<ListCodeScanFindingsResponse, AWSError>>> => ({
5454
$response: {
5555
hasNextPage: () => false,
56-
nextPage: () => undefined,
56+
nextPage: () => null, // eslint-disable-line unicorn/no-null
5757
data: undefined,
5858
error: undefined,
5959
requestId: '',

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@
521521
"adm-zip": "^0.5.10",
522522
"amazon-states-language-service": "^1.13.0",
523523
"async-lock": "^1.4.0",
524-
"aws-sdk": "^2.1384.0",
524+
"aws-sdk": "^2.1692.0",
525525
"aws-ssm-document-language-service": "^1.0.0",
526526
"bytes": "^3.1.2",
527527
"cross-fetch": "^4.0.0",

packages/core/src/test/codewhisperer/commands/transformByQ.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ describe('transformByQ', function () {
224224
requestId: 'requestId',
225225
hasNextPage: () => false,
226226
error: undefined,
227-
nextPage: () => undefined,
227+
nextPage: () => null, // eslint-disable-line unicorn/no-null
228228
redirectCount: 0,
229229
retryCount: 0,
230230
httpResponse: new HttpResponse(),

packages/core/src/test/codewhisperer/testUtil.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export const mockGetCodeScanResponse = {
226226
requestId: 'requestId',
227227
hasNextPage: () => false,
228228
error: undefined,
229-
nextPage: () => undefined,
229+
nextPage: () => null, // eslint-disable-line unicorn/no-null
230230
redirectCount: 0,
231231
retryCount: 0,
232232
httpResponse: new HttpResponse(),
@@ -246,7 +246,7 @@ export function createClient() {
246246
requestId: 'requestId',
247247
hasNextPage: () => false,
248248
error: undefined,
249-
nextPage: () => undefined,
249+
nextPage: () => null, // eslint-disable-line unicorn/no-null
250250
redirectCount: 0,
251251
retryCount: 0,
252252
httpResponse: new HttpResponse(),
@@ -263,7 +263,7 @@ export function createClient() {
263263
requestId: 'requestId',
264264
hasNextPage: () => false,
265265
error: undefined,
266-
nextPage: () => undefined,
266+
nextPage: () => null, // eslint-disable-line unicorn/no-null
267267
redirectCount: 0,
268268
retryCount: 0,
269269
httpResponse: new HttpResponse(),
@@ -306,7 +306,7 @@ export function createClient() {
306306
requestId: 'requestId',
307307
hasNextPage: () => false,
308308
error: undefined,
309-
nextPage: () => undefined,
309+
nextPage: () => null, // eslint-disable-line unicorn/no-null
310310
redirectCount: 0,
311311
retryCount: 0,
312312
httpResponse: new HttpResponse(),

0 commit comments

Comments
 (0)