Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Cloudfront Signer is not replaced #736

Open
Labels
bugSomething isn't working p2This is a standard priority issue
@darioackermann

Description

Self-service

  • I'd be willing to implement a fix

Describe the bug

Running transform containing a Cloudfront Signer does not transform, but only remove the legacy import

Steps to reproduce

import { CloudFront } from "aws-sdk";
//....
export async function cloudfrontSignUrl(url, expires_at_ms, options = {}) {
 // ...
	let signer = new CloudFront.Signer(accessKeyID, privateKeyContents);
	return signer.getSignedUrl({ url, expires: expires_at_ms, ...options });
}

Observed behavior

  • Removes import { CloudFront } from "aws-sdk";

Expected behavior

Should result in

import { getSignedUrl } from "@aws-sdk/cloudfront-signer";
// ...
export async function cloudfrontSignUrl(url, expires_at_ms, options = {}) {
 // ...
	return getSignedUrl({ url, privateKey: privateKeyContents, keyPairId: accessKeyID, dateLessThan: expires_at_ms})
}

Environment

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

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working p2This 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

        AltStyle によって変換されたページ (->オリジナル) /