File tree Expand file tree Collapse file tree 8 files changed +24
-13
lines changed Expand file tree Collapse file tree 8 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 11{
2- "$schema" : " https://unpkg.com/@changesets/config@1.0.1/schema.json" ,
3- "changelog" : " @changesets/cli/changelog" ,
4- "commit" : false ,
5- "access" : " public" ,
6- "baseBranch" : " master "
2+ "$schema" : " https://unpkg.com/@changesets/config@1.0.1/schema.json" ,
3+ "changelog" : " @changesets/cli/changelog" ,
4+ "commit" : false ,
5+ "access" : " public" ,
6+ "baseBranch" : " main "
77}
Original file line number Diff line number Diff line change 1+ ---
2+ ' @codeshift/cli ' : patch
3+ ' @codeshift/utils ' : patch
4+ ---
5+
6+ Minor internal tweaks
Original file line number Diff line number Diff line change 1+ ---
2+ ' @codeshift/test-utils ' : patch
3+ ---
4+
5+ Renames runTransform to applyTransform
Original file line number Diff line number Diff line change 11jest . autoMockOff ( ) ;
22
3- import { runTransform } from '@codeshift/test-utils' ;
3+ import { applyTransform } from '@codeshift/test-utils' ;
44import * as transformer from '../transform' ;
55
66const defineInlineTest = require ( 'jscodeshift/dist/testUtils' ) . defineInlineTest ;
77
88describe ( 'Update Avatar props' , ( ) => {
99 it ( 'should wrap avatar in a tooltip if name is defined' , ( ) => {
10- const result = runTransform (
10+ const result = applyTransform (
1111 transformer ,
1212 `
1313 import Avatar from '@atlaskit/avatar';
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ Options
2828 --help, 😱
2929
3030Examples
31- # Run all transforms for "@atlaskit /button" greater than version 3.0.0 and @atlaskit /range greater than 4.0.0
32- $ npx @codeshift/cli --packages @atlaskit /button@3.0.0,@atlaskit /range@4.0.0 /project/src
31+ # Run all transforms for "@mylib /button" greater than version 3.0.0 and @mylib /range greater than 4.0.0
32+ $ npx @codeshift/cli --packages @mylib /button@3.0.0,@mylib /range@4.0.0 /project/src
3333
3434 # Run the "my-custom-transform" transform of the "button" package
3535 $ npx @codeshift/cli -t my-custom-transform /project/src
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ interface Options {
66 parser ?: Parser ;
77}
88
9- export default function runTransform (
9+ export default function applyTransform (
1010 transform : any ,
1111 input : string ,
1212 options : Options = {
Original file line number Diff line number Diff line change 1- export { default as runTransform } from './run -transform' ;
1+ export { default as applyTransform } from './apply -transform' ;
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ export function hasImportDeclaration(
1313export function getImportDeclaration (
1414 j : core . JSCodeshift ,
1515 source : ReturnType < typeof j > ,
16- specifier : string ,
16+ importPath : string ,
1717) {
1818 return source
1919 . find ( j . ImportDeclaration )
20- . filter ( path => path . node . source . value === specifier ) ;
20+ . filter ( path => path . node . source . value === importPath ) ;
2121}
2222
2323export function getDefaultImportSpecifier (
You can’t perform that action at this time.
0 commit comments