@putout/printer 9.12.0 → 9.13.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/ChangeLog
CHANGED
package/lib/printer.js
CHANGED
|
@@ -8,6 +8,8 @@ const {maybeVisitor} = require('./tokenize/maybe/index');
|
|
|
8
8
|
const visitors = require('./tokenize/visitors');
|
|
9
9
|
|
|
10
10
|
module.exports.print = (ast, overrides = {}) => {
|
|
11
|
+
check(ast);
|
|
12
|
+
|
|
11
13
|
const options = maybeJSON(ast, overrides);
|
|
12
14
|
const tokens = tokenize(ast, options);
|
|
13
15
|
|
|
@@ -16,3 +18,8 @@ module.exports.print = (ast, overrides = {}) => {
|
|
|
16
18
|
|
|
17
19
|
module.exports.visitors = visitors;
|
|
18
20
|
module.exports.maybeVisitor = maybeVisitor;
|
|
21
|
+
|
|
22
|
+
function check(ast) {
|
|
23
|
+
if (typeof ast !== 'object')
|
|
24
|
+
throw Error('☝️Looks like ast not an object');
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.13.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Simplest possible opinionated Babel AST printer for 🐊Putout",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"check-dts": "^0.8.0",
|
|
57
57
|
"escover": "^4.0.1",
|
|
58
58
|
"eslint": "^9.0.0",
|
|
59
|
-
"eslint-plugin-putout": "^
|
|
59
|
+
"eslint-plugin-putout": "^23.0.0",
|
|
60
60
|
"estree-to-babel": "^9.0.0",
|
|
61
61
|
"goldstein": "^5.14.0",
|
|
62
62
|
"just-kebab-case": "^4.2.0",
|