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

Upgrade to AWS SKD 3.369.0 breaks mock functionality #174

Closed
1 task done
mariuszch opened this issue Jul 13, 2023 · 4 comments
Closed
1 task done

Upgrade to AWS SKD 3.369.0 breaks mock functionality #174

mariuszch opened this issue Jul 13, 2023 · 4 comments
Labels
bug Something isn't working waiting for reply

Comments

@mariuszch
Copy link

Checklist

  • I have read Caveats documentation and didn't find a solution for this problem there.

Bug description

Hi, updating aws sdk packages to version 3.369.0 breaks mock functionality, please see the screenshot attached.
It fails the same way for all 4 I use in my project: Dynamo, IotDataPlane, S3, STS

Looks like some type mismatch, because it works fine when I use ts-expect-error flag

image

Reproduction

const stsClientMock = mockClient(STSClient)

Environment

"@aws-sdk/client-dynamodb": "^3.369.0",
"@aws-sdk/client-iot": "^3.369.0",
"@aws-sdk/client-iot-data-plane": "^3.369.0",
"@aws-sdk/client-s3": "^3.369.0",
"@aws-sdk/client-sts": "^3.369.0",
"@aws-sdk/lib-dynamodb": "^3.369.0",
"@aws-sdk/util-stream-node": "^3.369.0",
"aws-sdk-client-mock": "^3.0.0",
@mariuszch mariuszch added the bug Something isn't working label Jul 13, 2023
hoonoh added a commit to hoonoh/aws-spot-price that referenced this issue Jul 13, 2023
@hoonoh
Copy link

hoonoh commented Jul 14, 2023

I got around this by adding dependency resolutions on @smithy/smithy-client to 1.0.3.

I didn't dive deep into this, but @smithy/smithy-client released 1.0.4 about a week ago and all aws client packages had dependency on this package marked as ^1.0.3. I guess there might be breaking changes between those versions.

@ArmenOzcelik
Copy link

Hi, I had similar issues and #167 helped me.

@m-radzikowski
Copy link
Owner

@mariuszch lib v3.0.0 works correctly with AWS SDK 3.369.0 and above - see example: https://codesandbox.io/s/typescript-playground-export-forked-th3ng6

Please make sure all your @aws-sdk/* and @smithy/* libs are in the same version

@j03w
Copy link

j03w commented Aug 22, 2023

in my case my dependencies have both @smithy/types 2.1 and 2.2 so as a quick hack I added @smithy/types 2.2 as dev dependencies and that solved the problem for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for reply
Projects
None yet
Development

No branches or pull requests

5 participants