Skip to content

Commit 163414a

Browse files
authored
Convert version callback to arrow function (#889)
1 parent df5b3ab commit 163414a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.changeset/thick-hounds-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"aws-sdk-js-codemod": patch
3+
---
4+
5+
Convert version callback to arrow function

src/utils/getJsCodeshiftParser.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,12 @@ export const getJsCodeshiftParser = () =>
141141
version: {
142142
display_index: 17,
143143
help: "print version and exit",
144-
callback: function () {
145-
return [
144+
callback: () =>
145+
[
146146
`aws-sdk-js-codemod: ${version}`,
147147
`- jscodeshift: ${requirePackage("jscodeshift").version}`,
148148
`- recast: ${requirePackage("recast").version}\n`,
149-
].join("\n");
150-
},
149+
].join("\n"),
151150
},
152151
stdin: {
153152
display_index: 14,

0 commit comments

Comments
 (0)