Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clients): allow client creation without configuration #5060

Merged
merged 2 commits into from Aug 8, 2023

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Aug 7, 2023

Issue

Fixes: #3415
smithy-ts smithy-lang/smithy-typescript#859

Description

Allows client creation without parameters

Testing

Tested first on TypeScript Playground

Verified that client-acm was successfully built on linking changes from smithy-lang/smithy-typescript#858

$ aws-sdlk-js-v3> rm -rf node_modules/@smithy/types && ln -s /local/home/trivikr/workspace/smithy-typescript/packages/types node_modules/@smithy/types && yarn

$ client-acm> yarn build:include:deps

Verified that TypeScript does not throw error on creating client without any parameters

$ cat test.ts
import { ACM } from "../aws-sdk-js-v3/clients/client-acm";

const clientWithoutParams = new ACM();
const clientWithParams = new ACM({ region: "us-west-2" });

$ yarn tsc --version
Version 5.1.6

$ yarn tsc test.ts

$ cat test.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var client_acm_1 = require("../aws-sdk-js-v3/clients/client-acm");
var clientWithoutParams = new client_acm_1.ACM();
var clientWithParams = new client_acm_1.ACM({ region: "us-west-2" });

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr force-pushed the codegen-type-check-optional-config branch from 568636b to 3e9ee69 Compare August 8, 2023 15:52
@trivikr trivikr marked this pull request as ready for review August 8, 2023 15:52
@trivikr trivikr requested a review from a team as a code owner August 8, 2023 15:52
@trivikr
Copy link
Member Author

trivikr commented Aug 8, 2023

Integration tests are successful

$ yarn test:e2e:legacy
...
149 scenarios (149 passed)
492 steps (492 passed)
2m43.989s (executing steps: 2m43.027s)
Done in 166.56s.

@trivikr trivikr merged commit a9723dc into aws:main Aug 8, 2023
3 checks passed
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
@trivikr trivikr deleted the codegen-type-check-optional-config branch October 16, 2023 18:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to create clients without passing configuration in TypeScript
2 participants