Open
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
The v2-to-v3 codemod imports DynamoDB.DocumentClient non AttributeValue types from lib-dynamodb
Steps to reproduce
Input code:
import AWS from "aws-sdk";
const endpoint: AWS.DynamoDB.DocumentClient.Endpoint = {
Address: "string",
CachePeriodInMinutes: 5,
};
Observed behavior
Output code:
import * as AWS_DynamoDBDocumentClient from "@aws-sdk/lib-dynamodb";
const endpoint: AWS_DynamoDBDocumentClient.Endpoint = {
Address: "string",
CachePeriodInMinutes: 5,
};
Expected behavior
Since lib-dynamodb does not re-export types from DynamoDB, the code should import type from DynamoDB instead
import * as AWS_DynamoDB from "@aws-sdk/client-dynamodb";
const endpoint: AWS_DynamoDB.Endpoint = {
Address: "string",
CachePeriodInMinutes: 5,
};
Environment
aws-sdk-js-codemod: 0.17.3
- jscodeshift: 0.15.0
- recast: 0.23.3
Additional context
No response