Skip to content

Commit 66a6c6d

Browse files
authored
feat!: migrate from AWS SDK v2 to v3 (#685)
BREAKING CHANGE: removed v2 SDK support, updated to v3-only APIs ## Problem AWS SDK V2 is at EOL. ## Solution Remove V2 client constructors <!--- REMINDER: - Read CONTRIBUTING.md first. - Add test coverage for your changes. - Link to related issues/commits. - Testing: how did you test your changes? - Screenshots if applicable --> ## License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8eaa14a commit 66a6c6d

File tree

9 files changed

+64
-288
lines changed

9 files changed

+64
-288
lines changed

package-lock.json

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

runtimes/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"@opentelemetry/sdk-metrics": "^2.0.1",
4242
"@smithy/node-http-handler": "^4.0.4",
4343
"ajv": "^8.17.1",
44-
"aws-sdk": "^2.1692.0",
4544
"hpagent": "^1.2.0",
4645
"jose": "^5.9.6",
4746
"mac-ca": "^3.1.1",

runtimes/runtimes/base-runtime.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ import {
7272
Runtime,
7373
Telemetry,
7474
Workspace,
75-
SDKClientConstructorV2,
7675
SDKClientConstructorV3,
7776
SDKInitializator,
7877
MessageReader,
@@ -99,8 +98,6 @@ import {
9998
import { IdentityManagement } from '../server-interface/identity-management'
10099
import { WebBase64Encoding } from './encoding'
101100
import { LoggingServer } from './lsp/router/loggingServer'
102-
import { Service } from 'aws-sdk'
103-
import { ServiceConfigurationOptions } from 'aws-sdk/lib/service'
104101
import { getClientInitializeParamsHandlerFactory } from './util/lspCacheUtil'
105102
import { newAgent } from './agent'
106103
import { ShowSaveFileDialogRequestType, CheckDiagnosticsRequestType } from '../protocol/window'
@@ -308,17 +305,8 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag
308305
},
309306
}
310307

311-
const sdkInitializator: SDKInitializator = Object.assign(
312-
// Default callable function for v3 clients
313-
<T, P>(Ctor: SDKClientConstructorV3<T, P>, current_config: P): T => new Ctor({ ...current_config }),
314-
// Property for v2 clients
315-
{
316-
v2: <T extends Service, P extends ServiceConfigurationOptions>(
317-
Ctor: SDKClientConstructorV2<T, P>,
318-
current_config: P
319-
): T => new Ctor({ ...current_config }),
320-
}
321-
)
308+
const sdkInitializator: SDKInitializator = <T, P>(Ctor: SDKClientConstructorV3<T, P>, current_config: P): T =>
309+
new Ctor({ ...current_config })
322310
credentialsProvider.onCredentialsDeleted = lspServer.setCredentialsDeleteHandler
323311

324312
const agent = newAgent()

0 commit comments

Comments
 (0)