You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an identifier is passed in client constructor, it might have been intialized and updated at several places or called from different file. The transformer does not have access to this data.
However, the transformer can add a comment on any action developer can take, as follows:
import{S3}from"@aws-sdk/client-s3";constconfig={sslEnabled: true};// Codemod only supports transformation of config passed as ObjectExpression.// Please re-run codemod by converting Identifier to ObjectExpression.consts3=newS3(config);
Alternatives
Add detection of Identifier creation in the file, and transform it.
Self-service
Problem
The config keys are not transformed when client constructor input is not an ObjectExpression (like an Identifier).
Example input:
Output:
Solution
When an identifier is passed in client constructor, it might have been intialized and updated at several places or called from different file. The transformer does not have access to this data.
However, the transformer can add a comment on any action developer can take, as follows:
Alternatives
Add detection of Identifier creation in the file, and transform it.
Additional context
https://github.com/workadventure/workadventure/blob/596886c66383404a642a333ed8c37e9643b313de/uploader/tests/utils/LocalStackContainer.ts#L13-L14
The text was updated successfully, but these errors were encountered: