@putout/engine-parser 7.2.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/generate.js +1 -1
- package/lib/parsers/babel/index.js +2 -4
- package/lib/parsers/hermes.js +1 -3
- package/lib/print.js +1 -1
- package/lib/recast/move-out-directives.js +2 -1
- package/lib/template.js +1 -1
- package/package.json +4 -7
package/lib/generate.js
CHANGED
|
@@ -13,7 +13,7 @@ const plugins = require('./plugins');
|
|
|
13
13
|
const options = require('./options');
|
|
14
14
|
const getFlow = (a) => !a.indexOf('// @flow');
|
|
15
15
|
const clean = (a) => a.filter(Boolean);
|
|
16
|
-
const initBabel = once(() => require('@babel
|
|
16
|
+
const initBabel = once(() => require('@putout/babel'));
|
|
17
17
|
const {assign} = Object;
|
|
18
18
|
|
|
19
19
|
// There is a difference in options naming for babel and recast
|
|
@@ -40,9 +40,7 @@ module.exports.parse = function babelParse(source, {sourceFilename, isTS, isJSX
|
|
|
40
40
|
sourceFilename,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return ast;
|
|
43
|
+
return parse(source, parserOptions);
|
|
46
44
|
};
|
|
47
45
|
|
|
48
46
|
function getBabelLangExts({isTS, isFlow, isJSX}) {
|
package/lib/parsers/hermes.js
CHANGED
package/lib/print.js
CHANGED
package/lib/template.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const template = require('@babel
|
|
3
|
+
const {template} = require('@putout/babel');
|
|
4
4
|
const {nanomemoize} = require('nano-memoize');
|
|
5
5
|
const plugins = require('./parsers/babel/plugins');
|
|
6
6
|
const options = require('./parsers/babel/options');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-parser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout parser",
|
|
@@ -33,10 +33,7 @@
|
|
|
33
33
|
"report": "madrun report"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel
|
|
37
|
-
"@babel/parser": "^7.19.0",
|
|
38
|
-
"@babel/template": "^7.18.10",
|
|
39
|
-
"@babel/types": "^7.19.0",
|
|
36
|
+
"@putout/babel": "^1.0.4",
|
|
40
37
|
"@putout/printer": "^2.0.0",
|
|
41
38
|
"@putout/recast": "^1.12.1",
|
|
42
39
|
"estree-to-babel": "^6.0.0",
|
|
@@ -55,7 +52,7 @@
|
|
|
55
52
|
"c8": "^8.0.0",
|
|
56
53
|
"eslint": "^8.0.1",
|
|
57
54
|
"eslint-plugin-n": "^16.0.0",
|
|
58
|
-
"eslint-plugin-putout": "^
|
|
55
|
+
"eslint-plugin-putout": "^19.0.0",
|
|
59
56
|
"espree": "^9.0.0",
|
|
60
57
|
"esprima": "^4.0.1",
|
|
61
58
|
"hermes-parser": "^0.14.0",
|
|
@@ -64,7 +61,7 @@
|
|
|
64
61
|
"madrun": "^9.0.0",
|
|
65
62
|
"mock-require": "^3.0.3",
|
|
66
63
|
"montag": "^1.0.0",
|
|
67
|
-
"nodemon": "^
|
|
64
|
+
"nodemon": "^3.0.1",
|
|
68
65
|
"putout": "*",
|
|
69
66
|
"supertape": "^8.0.0",
|
|
70
67
|
"tenko": "^2.0.0"
|