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

[Feature]: Transform deep import of DocumentClient #799

Open
1 task
trivikr opened this issue Mar 8, 2024 · 1 comment · May be fixed by #847
Open
1 task

[Feature]: Transform deep import of DocumentClient #799

trivikr opened this issue Mar 8, 2024 · 1 comment · May be fixed by #847
Labels
enhancement New feature or request p3 This is a minor priority issue

Comments

@trivikr
Copy link
Member

trivikr commented Mar 8, 2024

Self-service

  • I'd be willing to implement this feature

Problem

Transformation is not done for the following code:

import { DocumentClient } from 'aws-sdk/lib/dynamodb/document_client';

const client = new DocumentClient();

Solution

Transformed code

import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
import { DynamoDB } from '@aws-sdk/client-dynamodb';

const client = DynamoDBDocument.from(new DynamoDB());

Alternatives

Skip the transformation, as deep import from aws-sdk/lib/* is not documented in public.
The official documented deep import is aws-sdk/clients/*

Additional context

No response

@trivikr trivikr added enhancement New feature or request p3 This is a minor priority issue labels Mar 8, 2024
@trivikr trivikr linked a pull request Apr 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p3 This is a minor priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant