Skip to content

Commit 4fe5168

Browse files
authored
deps(cw): regen clients with codegen at 0.25.x (#6439)
## Problem The two streaming clients committed to the repo are generated via different versions of `smithy-typescript-codegen`. Each version of codegen pins the generated client to use specific versions of `@aws-sdk/*` and `@smithy/*` packages. The root project also consumes different versions of these packages. Therefore, the project is currently consuming three different versions of many `@aws-sdk/*` and `@smithy/*` packages. This is problematic because it can cause dependency conflicts. Certain versions of `@aws-sdk/*` and `@smithy/*` packages are only compatible with certain other versions. For more information on this, see the discussion involving help from an SDK team member explaining this problem. ## Solution - Regenerate both clients with the same version of codegen `0.25.x`. - Pin all necessary versions to ensure a single version of `@aws-sdk/*` and `@smithy/*` packages. - Add documentation to the build instructions that these clients must stay in-sync (in terms of codegen). - Add documentation regarding updating `@aws-sdk/*` packages. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 6ce9dca commit 4fe5168

39 files changed

+20305
-24676
lines changed

package-lock.json

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

packages/core/package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -496,28 +496,28 @@
496496
"dependencies": {
497497
"@amzn/amazon-q-developer-streaming-client": "file:../../src.gen/@amzn/amazon-q-developer-streaming-client",
498498
"@amzn/codewhisperer-streaming": "file:../../src.gen/@amzn/codewhisperer-streaming",
499-
"@aws-sdk/client-cloudformation": "^3.667.0",
500-
"@aws-sdk/client-cloudwatch-logs": "^3.666.0",
501-
"@aws-sdk/client-cognito-identity": "^3.637.0",
502-
"@aws-sdk/client-docdb": "^3.699.0",
503-
"@aws-sdk/client-docdb-elastic": "^3.699.0",
504-
"@aws-sdk/client-lambda": "^3.637.0",
505-
"@aws-sdk/client-sso": "^3.342.0",
506-
"@aws-sdk/client-sso-oidc": "^3.574.0",
507-
"@aws-sdk/credential-provider-env": "3.696.0",
508-
"@aws-sdk/credential-provider-process": "3.37.0",
509-
"@aws-sdk/credential-provider-sso": "^3.345.0",
510-
"@aws-sdk/property-provider": "3.46.0",
511-
"@aws-sdk/smithy-client": "^3.46.0",
512-
"@aws-sdk/util-arn-parser": "^3.46.0",
499+
"@aws-sdk/client-cloudformation": "<3.696.0",
500+
"@aws-sdk/client-cloudwatch-logs": "<3.696.0",
501+
"@aws-sdk/client-cognito-identity": "<3.696.0",
502+
"@aws-sdk/client-docdb": "<3.696.0",
503+
"@aws-sdk/client-docdb-elastic": "<3.696.0",
504+
"@aws-sdk/client-lambda": "<3.696.0",
505+
"@aws-sdk/client-sso": "<3.696.0",
506+
"@aws-sdk/client-sso-oidc": "<3.696.0",
507+
"@aws-sdk/credential-provider-env": "<3.696.0",
508+
"@aws-sdk/credential-provider-process": "<3.696.0",
509+
"@aws-sdk/credential-provider-sso": "<3.696.0",
510+
"@aws-sdk/property-provider": "<3.696.0",
511+
"@aws-sdk/smithy-client": "<3.696.0",
512+
"@aws-sdk/util-arn-parser": "<3.696.0",
513513
"@aws/mynah-ui": "^4.22.1",
514514
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
515515
"@iarna/toml": "^2.2.5",
516-
"@smithy/middleware-retry": "^2.3.1",
517-
"@smithy/protocol-http": "^3.3.0",
518-
"@smithy/service-error-classification": "^2.1.5",
519-
"@smithy/shared-ini-file-loader": "^2.2.8",
520-
"@smithy/util-retry": "^2.2.0",
516+
"@smithy/middleware-retry": "^3.0.0",
517+
"@smithy/protocol-http": "^4.0.0",
518+
"@smithy/service-error-classification": "^3.0.0",
519+
"@smithy/shared-ini-file-loader": "^3.0.0",
520+
"@smithy/util-retry": "^3.0.0",
521521
"@vscode/debugprotocol": "^1.57.0",
522522
"@zip.js/zip.js": "^2.7.41",
523523
"adm-zip": "^0.5.10",

packages/core/src/amazonqFeatureDev/client/featureDev.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
MetricData,
3333
TelemetryEvent,
3434
} from './featuredevproxyclient'
35+
import { ExportResultArchiveCommandInput } from '@amzn/codewhisperer-streaming'
3536
import { FeatureClient } from '../../amazonq/client/client'
3637

3738
// Re-enable once BE is able to handle retries.
@@ -229,7 +230,7 @@ export class FeatureDevClient implements FeatureClient {
229230
const params = {
230231
exportId: conversationId,
231232
exportIntent: 'TASK_ASSIST',
232-
}
233+
} satisfies ExportResultArchiveCommandInput
233234
getLogger().debug(`Executing exportResultArchive with %O`, params)
234235
const archiveResponse = await streamingClient.exportResultArchive(params)
235236
const buffer: number[] = []

packages/core/src/shared/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import * as vscode from 'vscode'
77
import { AWSError } from 'aws-sdk'
8-
import { ServiceException } from '@aws-sdk/smithy-client'
8+
import { ServiceException } from '@smithy/smithy-client'
99
import { isThrottlingError, isTransientError } from '@smithy/service-error-classification'
1010
import { Result } from './telemetry/telemetry'
1111
import { CancellationError } from './utilities/timeoutUtils'

src.gen/@amzn/amazon-q-developer-streaming-client/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
189+
Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

src.gen/@amzn/amazon-q-developer-streaming-client/README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
AWS SDK for JavaScript QDeveloperStreaming Client for Node.js, Browser and React Native.
88

99
## Installing
10-
To install the this package, simply type add or install @amzn/amazon-q-developer-streaming-client
10+
To install this package, simply type add or install @amzn/amazon-q-developer-streaming-client
1111
using your favorite package manager:
1212
- `npm install @amzn/amazon-q-developer-streaming-client`
1313
- `yarn add @amzn/amazon-q-developer-streaming-client`
@@ -194,6 +194,7 @@ To contribute to client you can check our [generate clients scripts](https://git
194194
This SDK is distributed under the
195195
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
196196
see LICENSE for more information.
197+
197198
## Client Commands (Operations List)
198199

199200
<details>
@@ -324,6 +325,13 @@ UpdateProfile
324325
</details>
325326
<details>
326327
<summary>
328+
VendKeyGrant
329+
</summary>
330+
331+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/VendKeyGrantCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/VendKeyGrantCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/VendKeyGrantCommandOutput/)
332+
</details>
333+
<details>
334+
<summary>
327335
CreateArtifactUploadUrl
328336
</summary>
329337

@@ -366,6 +374,13 @@ GetCodeAnalysis
366374
</details>
367375
<details>
368376
<summary>
377+
GetCodeFixJob
378+
</summary>
379+
380+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/GetCodeFixJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetCodeFixJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetCodeFixJobCommandOutput/)
381+
</details>
382+
<details>
383+
<summary>
369384
GetTaskAssistCodeGeneration
370385
</summary>
371386

@@ -436,6 +451,13 @@ StartCodeAnalysis
436451
</details>
437452
<details>
438453
<summary>
454+
StartCodeFixJob
455+
</summary>
456+
457+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/StartCodeFixJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/StartCodeFixJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/StartCodeFixJobCommandOutput/)
458+
</details>
459+
<details>
460+
<summary>
439461
StartTaskAssistCodeGeneration
440462
</summary>
441463

@@ -485,6 +507,13 @@ GenerateTaskAssistPlan
485507
</details>
486508
<details>
487509
<summary>
510+
AssociateConnectorResource
511+
</summary>
512+
513+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/AssociateConnectorResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/AssociateConnectorResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/AssociateConnectorResourceCommandOutput/)
514+
</details>
515+
<details>
516+
<summary>
488517
CreateAssignment
489518
</summary>
490519

@@ -534,6 +563,13 @@ DeletePlugin
534563
</details>
535564
<details>
536565
<summary>
566+
GetConnector
567+
</summary>
568+
569+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/GetConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetConnectorCommandOutput/)
570+
</details>
571+
<details>
572+
<summary>
537573
GetConversation
538574
</summary>
539575

@@ -590,6 +626,13 @@ ListConversations
590626
</details>
591627
<details>
592628
<summary>
629+
ListDashboardMetrics
630+
</summary>
631+
632+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/ListDashboardMetricsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/ListDashboardMetricsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/ListDashboardMetricsCommandOutput/)
633+
</details>
634+
<details>
635+
<summary>
593636
ListExtensionProviders
594637
</summary>
595638

@@ -639,6 +682,13 @@ PassRequest
639682
</details>
640683
<details>
641684
<summary>
685+
RejectConnector
686+
</summary>
687+
688+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/RejectConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/RejectConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/RejectConnectorCommandOutput/)
689+
</details>
690+
<details>
691+
<summary>
642692
SendEvent
643693
</summary>
644694

0 commit comments

Comments
 (0)