File tree Expand file tree Collapse file tree 3 files changed +15
-17
lines changed Expand file tree Collapse file tree 3 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 44
44
"import-local" : " ^1.0.0" ,
45
45
"jscodeshift" : " ^0.5.1" ,
46
46
"pkg-up" : " ^2.0.0" ,
47
- "recast" : " ^0.15.0 " ,
47
+ "recast" : " ^0.16.1 " ,
48
48
"yargs" : " ^11.0.0"
49
49
},
50
50
"devDependencies" : {
Original file line number Diff line number Diff line change 2
2
3
3
function getJSCodeshiftParser ( api ) {
4
4
try {
5
- // this is bad, but works around a bug in recent @babel/parser versions:
6
- let babelParser = require ( '@babel/parser' ) ;
7
- let parser = {
8
- parse ( source , _options ) {
9
- let options = require ( 'recast/parsers/_babylon_options' ) ( _options ) ;
10
- options . plugins = options . plugins . filter ( plugin => plugin !== 'pipelineOperator' ) ;
11
- options . plugins . push ( [ 'pipelineOperator' , { proposal : 'minimal' } ] ) ;
12
- options . plugins . push ( 'typescript' ) ;
13
-
14
- return babelParser . parse ( source , options ) ;
15
- } ,
16
- } ;
17
-
18
- // the above should be replace with the following (once
19
- // https://github.com/benjamn/recast/pull/521 lands in a release):
20
- // let parser = require('recast/parsers/typescript');
5
+ let parser = require ( 'recast/parsers/typescript' ) ;
21
6
22
7
return api . jscodeshift . withParser ( parser ) ;
23
8
} catch ( e ) {
Original file line number Diff line number Diff line change @@ -227,6 +227,10 @@ ast-types@0.11.5:
227
227
version "0.11.5"
228
228
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.5.tgz#9890825d660c03c28339f315e9fa0a360e31ec28"
229
229
230
+ ast-types@0.11.6 :
231
+ version "0.11.6"
232
+ resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.6.tgz#4e2266c2658829aef3b40cc33ad599c4e9eb89ef"
233
+
230
234
astral-regex@^1.0.0 :
231
235
version "1.0.0"
232
236
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
@@ -4076,6 +4080,15 @@ recast@^0.15.0:
4076
4080
private "~0.1.5"
4077
4081
source-map "~0.6.1"
4078
4082
4083
+ recast@^0.16.1 :
4084
+ version "0.16.1"
4085
+ resolved "https://registry.yarnpkg.com/recast/-/recast-0.16.1.tgz#865f1800ef76e42e5d0375763b80f4d6a05f2069"
4086
+ dependencies :
4087
+ ast-types "0.11.6"
4088
+ esprima "~4.0.0"
4089
+ private "~0.1.5"
4090
+ source-map "~0.6.1"
4091
+
4079
4092
regenerate@^1.2.1 :
4080
4093
version "1.4.0"
4081
4094
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
You can’t perform that action at this time.
0 commit comments