@putout/printer 1.134.1 → 1.135.1
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
|
@@ -29,6 +29,7 @@ const isInsideArray = (path) => path.parentPath.isArrayExpression();
|
|
|
29
29
|
const isSimpleAndCall = ([a, b]) => isSimple(a) && isCallExpression(b);
|
|
30
30
|
const isBooleanAndSimple = ([a, b]) => isBooleanLiteral(a) && isSimple(b);
|
|
31
31
|
const isNullAndSimple = ([a, b]) => isNullLiteral(a) && isSimple(b);
|
|
32
|
+
const isSimpleAndObject = ([a, b]) => isSimple(a) && isObjectExpression(b);
|
|
32
33
|
|
|
33
34
|
const isStringAndObject = (elements) => {
|
|
34
35
|
const first = elements.at(0);
|
|
@@ -260,6 +261,9 @@ function isNewlineBetweenElements(path, {elements}) {
|
|
|
260
261
|
if (isStringAndIdentifier(elements))
|
|
261
262
|
return false;
|
|
262
263
|
|
|
264
|
+
if (isSimpleAndObject(elements))
|
|
265
|
+
return false;
|
|
266
|
+
|
|
263
267
|
if (isStringAndString(elements) && path.parentPath.isArrayExpression() && isArrayExpression(path.parentPath.node.elements[0]))
|
|
264
268
|
return false;
|
|
265
269
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.135.1",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/parser": "^7.19.0",
|
|
31
31
|
"@babel/traverse": "^7.21.2",
|
|
32
32
|
"@babel/types": "^7.21.3",
|
|
33
|
-
"@putout/compare": "^
|
|
33
|
+
"@putout/compare": "^10.0.0",
|
|
34
34
|
"@putout/operate": "^8.11.0",
|
|
35
35
|
"fullstore": "^3.0.0",
|
|
36
36
|
"just-snake-case": "^3.2.0",
|