diff --git a/packages/thumbprint-codemods/CHANGELOG.md b/packages/thumbprint-codemods/CHANGELOG.md index a31375fbc..f0fbe77c5 100644 --- a/packages/thumbprint-codemods/CHANGELOG.md +++ b/packages/thumbprint-codemods/CHANGELOG.md @@ -2,6 +2,14 @@ ## Unreleased +### Added + +- [Minor] Support TypeScript (`.ts`, `.tsx`) files. + +### Changed + +- [Patch] Upgrade jscodeshift from `0.6.4` to `0.7.0`. + ## 0.4.0 - 2019-12-05 ### Added diff --git a/packages/thumbprint-codemods/index.js b/packages/thumbprint-codemods/index.js index 1c99107da..e78624335 100755 --- a/packages/thumbprint-codemods/index.js +++ b/packages/thumbprint-codemods/index.js @@ -67,8 +67,10 @@ if (!cli.flags.codemod || !codemods[cli.flags.codemod]) { const commandArgs = [ 'jscodeshift', ...cli.input, + '--parser', + 'tsx', '--extensions', - 'js,jsx', + 'js,jsx,ts,tsx', '-t', codemods[cli.flags.codemod], ]; diff --git a/packages/thumbprint-codemods/package.json b/packages/thumbprint-codemods/package.json index 40dc811ff..1b13eda63 100644 --- a/packages/thumbprint-codemods/package.json +++ b/packages/thumbprint-codemods/package.json @@ -28,7 +28,7 @@ "dependencies": { "execa": "^2.0.4", "globby": "^10.0.1", - "jscodeshift": "^0.6.4", + "jscodeshift": "^0.7.0", "lodash": "^4.17.11", "meow": "^5.0.0" } diff --git a/yarn.lock b/yarn.lock index aa002e857..aca9d62ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3452,10 +3452,10 @@ ast-types@0.11.5: resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.5.tgz#9890825d660c03c28339f315e9fa0a360e31ec28" integrity sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw== -ast-types@0.11.7: - version "0.11.7" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.7.tgz#f318bf44e339db6a320be0009ded64ec1471f46c" - integrity sha512-2mP3TwtkY/aTv5X3ZsMpNAbOnyoC/aMJwJSoaELPkHId0nSQgFcnU4dRW3isxiz7+zBexk0ym3WNVjMiQBnJSw== +ast-types@0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.2.tgz#df39b677a911a83f3a049644fb74fdded23cea48" + integrity sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA== ast-types@^0.12.4: version "0.12.4" @@ -11125,10 +11125,10 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jscodeshift@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.6.4.tgz#e19ab86214edac86a75c4557fc88b3937d558a8e" - integrity sha512-+NF/tlNbc2WEhXUuc4WEJLsJumF84tnaMUZW2hyJw3jThKKRvsPX4sPJVgO1lPE28z0gNL+gwniLG9d8mYvQCQ== +jscodeshift@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.7.0.tgz#4eee7506fd4fdacbd80340287d61575af991fdab" + integrity sha512-Kt6rpTa1HVhAWagD6J0y6qxxqRmDgkFvczerLgOsDNSGoUZSmq2CO1vFRcda9OV1BaZKSHCIh+VREPts5tB/Ig== dependencies: "@babel/core" "^7.1.6" "@babel/parser" "^7.1.6" @@ -11145,7 +11145,7 @@ jscodeshift@^0.6.4: micromatch "^3.1.10" neo-async "^2.5.0" node-dir "^0.1.17" - recast "^0.16.1" + recast "^0.18.1" temp "^0.8.1" write-file-atomic "^2.3.0" @@ -14758,7 +14758,7 @@ prism-react-renderer@0.1.7, prism-react-renderer@^0.1.0: resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-0.1.7.tgz#dc273d0cb6e4a498ba0775094e9a8b01a3ad2eaa" integrity sha512-EhnM0sYfLK103ASK0ViSv0rta//ZGB0dBA9TiFyOvA+zOj5peLmGEG01sLEDwl9sMe+gSqncInafBe1VFTCMvA== -private@^0.1.6, private@~0.1.5: +private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -15766,14 +15766,14 @@ realpath-native@^1.1.0: dependencies: util.promisify "^1.0.0" -recast@^0.16.1: - version "0.16.2" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.16.2.tgz#3796ebad5fe49ed85473b479cd6df554ad725dc2" - integrity sha512-O/7qXi51DPjRVdbrpNzoBQH5dnAPQNbfoOFyRiUwreTMJfIHYOEBzwuH+c0+/BTSJ3CQyKs6ILSWXhESH6Op3A== +recast@^0.18.1: + version "0.18.5" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.18.5.tgz#9d5adbc07983a3c8145f3034812374a493e0fe4d" + integrity sha512-sD1WJrpLQAkXGyQZyGzTM75WJvyAd98II5CHdK3IYbt/cZlU0UzCRVU11nUFNXX9fBVEt4E9ajkMjBlUlG+Oog== dependencies: - ast-types "0.11.7" + ast-types "0.13.2" esprima "~4.0.0" - private "~0.1.5" + private "^0.1.8" source-map "~0.6.1" recursive-readdir@2.2.1: