@putout/printer 18.1.2 → 18.1.3

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
@@ -1,3 +1,8 @@
1
+ 2026.03.06, v18.1.3
2
+
3
+ fix:
4
+ - 033b2a6 @putout/printer: ArrayExpression: maxElementLengthInOneLine
5
+
1
6
  2026.03.06, v18.1.2
2
7
 
3
8
  feature:
@@ -151,10 +151,13 @@ const isMoreThenMaxLiteralLength = (path, {maxElementLengthInOneLine}) => {
151
151
  return first.value.length > maxElementLengthInOneLine;
152
152
  };
153
153
 
154
- const isMoreThenMaxIdentifierLength = (path) => {
154
+ const isMoreThenMaxIdentifierLength = (path, {maxElementLengthInOneLine}) => {
155
155
  const [first] = path.node.elements;
156
156
 
157
- return isIdentifier(first);
157
+ if (!isIdentifier(first))
158
+ return false;
159
+
160
+ return first.name.length > maxElementLengthInOneLine;
158
161
  };
159
162
 
160
163
  const isMoreThenMaxElementLengthInOneLine = createTypeChecker([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.1.2",
3
+ "version": "18.1.3",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",