Skip to content

[Bug]: The global require is not removed in TS file #654

@trivikr

Description

@trivikr

Self-service

  • I'd be willing to implement a fix

Describe the bug

The global require is not removed in TS file

Steps to reproduce

const AWS = require("aws-sdk");

const client = new AWS.DynamoDB();

Observed behavior

const {
  DynamoDB
} = require("@aws-sdk/client-dynamodb");

const AWS = require("aws-sdk");

const client = new DynamoDB();

Expected behavior

const {
  DynamoDB
} = require("@aws-sdk/client-dynamodb");

const client = new DynamoDB();

Environment

aws-sdk-js-codemod: 0.25.1
- jscodeshift: 0.15.0
- recast: 0.23.4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions