File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
packages/publisher/template Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -59,17 +59,14 @@ export default function transformer(
5959 { jscodeshift : j } : API ,
6060 options : Options ,
6161) {
62+ const packageName = '@atlaskit/avatar' ;
6263 const source = j ( file . source ) ;
6364
64- if ( ! hasImportDeclaration ( j , source , '@atlaskit/avatar' ) ) {
65+ if ( ! hasImportDeclaration ( j , source , packageName ) ) {
6566 return file . source ;
6667 }
6768
68- const defaultSpecifier = getDefaultImportSpecifier (
69- j ,
70- source ,
71- '@atlaskit/avatar' ,
72- ) ;
69+ const defaultSpecifier = getDefaultImportSpecifier ( j , source , packageName ) ;
7370
7471 if ( defaultSpecifier != null ) {
7572 wrapChildrenProp ( j , source , defaultSpecifier ) ;
@@ -78,7 +75,7 @@ export default function transformer(
7875 const importSpecifier = getImportSpecifier (
7976 j ,
8077 source ,
81- '@atlaskit/avatar' ,
78+ packageName ,
8279 'AvatarItem' ,
8380 ) ;
8481
Original file line number Diff line number Diff line change 1- codeshift.config.json
21src
32node_modules
43** /__test__
You can’t perform that action at this time.
0 commit comments