@putout/printer 14.5.0 → 14.5.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
@@ -1,3 +1,8 @@
1
+ 2025.04.25, v14.5.1
2
+
3
+ feature:
4
+ - b9d9316 @putout/printer: function: params: printAfterClose -> printBeforeClose
5
+
1
6
  2025.04.25, v14.5.0
2
7
 
3
8
  feature:
@@ -18,8 +18,8 @@ module.exports.printParams = (path, printer, semantics, customization = {}) => {
18
18
  braceOpen = '(',
19
19
  braceClose = ')',
20
20
  printSpace = print.space,
21
- printBeforeFirst = noop,
22
- printAfterLast = noop,
21
+ printAfterOpen = noop,
22
+ printBeforeClose = noop,
23
23
  } = customization;
24
24
 
25
25
  if (typeParameters)
@@ -31,7 +31,7 @@ module.exports.printParams = (path, printer, semantics, customization = {}) => {
31
31
  }, semantics);
32
32
 
33
33
  parseComments(path, printer, semantics);
34
- printBeforeFirst();
34
+ printAfterOpen();
35
35
 
36
36
  const n = params.length - 1;
37
37
 
@@ -49,7 +49,7 @@ module.exports.printParams = (path, printer, semantics, customization = {}) => {
49
49
 
50
50
  maybe.print(extra?.trailingComma, ',');
51
51
 
52
- printAfterLast();
52
+ printBeforeClose();
53
53
  printBraceClose(path, {
54
54
  print,
55
55
  braceClose,
@@ -36,14 +36,14 @@ module.exports.printFunctionParams = (path, printer, semantics) => {
36
36
  printer,
37
37
  });
38
38
 
39
- const printBeforeFirst = createPrintBeforeFirst(path, {
39
+ const printAfterOpen = createPrintAfterOpen(path, {
40
40
  type: 'inc',
41
41
  printer,
42
42
  isNewline,
43
43
  isAllHasComments,
44
44
  });
45
45
 
46
- const printAfterLast = createPrintAfterLast({
46
+ const printBeforeClose = createPrintBeforeClose({
47
47
  type: 'dec',
48
48
  printer,
49
49
  isNewline,
@@ -51,13 +51,13 @@ module.exports.printFunctionParams = (path, printer, semantics) => {
51
51
  });
52
52
 
53
53
  printParams(path, printer, semantics, {
54
- printBeforeFirst,
54
+ printAfterOpen,
55
55
  printSpace,
56
- printAfterLast,
56
+ printBeforeClose,
57
57
  });
58
58
  };
59
59
 
60
- const createPrintBeforeFirst = (path, {isNewline, isAllHasComments, printer, type}) => () => {
60
+ const createPrintAfterOpen = (path, {isNewline, isAllHasComments, printer, type}) => () => {
61
61
  if (!isNewline)
62
62
  return;
63
63
 
@@ -74,7 +74,7 @@ const createPrintBeforeFirst = (path, {isNewline, isAllHasComments, printer, typ
74
74
  indent();
75
75
  };
76
76
 
77
- const createPrintAfterLast = ({isNewline, printer, isAllHasComments, type}) => () => {
77
+ const createPrintBeforeClose = ({isNewline, printer, isAllHasComments, type}) => () => {
78
78
  if (!isNewline)
79
79
  return;
80
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "14.5.0",
3
+ "version": "14.5.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",