@putout/printer 14.3.7 → 14.5.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
@@ -1,3 +1,23 @@
1
+ 2025.04.25, v14.5.0
2
+
3
+ feature:
4
+ - 2c80b2d @putout/printer: export: params
5
+
6
+ 2025.04.15, v14.4.0
7
+
8
+ feature:
9
+ - c15e8d1 @putout/printer: json: string-literal
10
+ - fb50b99 @putout/printer: supertape v11.1.0
11
+ - 7e46e0a @putout/printer: samadhi v3.0.3
12
+ - d4222cf @putout/printer: putout v40.0.1
13
+ - f24d29d @putout/printer: goldstein v6.0.1
14
+ - 72a05df @putout/printer: estree-to-babel v11.0.2
15
+ - 36aefdf @putout/printer: check-dts v0.9.0
16
+ - bcb7a53 @putout/printer: @putout/plugin-react-hooks v8.0.1
17
+ - 809bfe2 @putout/printer: @putout/plugin-react-hook-form v6.0.0
18
+ - b5c91ec @putout/printer: @putout/plugin-promises v17.0.0
19
+ - 6c24426 @putout/printer: @putout/compare v17.0.0
20
+
1
21
  2025.03.29, v14.3.7
2
22
 
3
23
  fix:
package/lib/json.js CHANGED
@@ -19,8 +19,8 @@ module.exports.maybeJSON = (ast, overrides) => {
19
19
  semantics: {
20
20
  ...overrides?.semantics,
21
21
  trailingComma: false,
22
- encodeSingleQuote: false,
23
- encodeDoubleQuote: true,
22
+ escapeSingleQuote: false,
23
+ escapeDoubleQuote: true,
24
24
  },
25
25
  };
26
26
 
@@ -1,24 +1,16 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports.StringLiteral = (path, {write}, semantics) => {
4
- const {raw, value} = path.node;
4
+ const {value, raw = `'${value}'`} = path.node;
5
5
 
6
- if (raw && path.parentPath.isJSXAttribute()) {
6
+ if (path.parentPath.isJSXAttribute()) {
7
7
  write(raw);
8
8
  return;
9
9
  }
10
10
 
11
- if (raw) {
12
- const value = raw.slice(1, -1);
13
- write.quote();
14
- write(maybeEscape(value, semantics));
15
- write.quote();
16
-
17
- return;
18
- }
19
-
11
+ const newValue = raw.slice(1, -1);
20
12
  write.quote();
21
- write(value);
13
+ write(maybeEscape(newValue, semantics));
22
14
  write.quote();
23
15
  };
24
16
 
@@ -190,4 +190,3 @@ function hasTrailingBlock(path) {
190
190
 
191
191
  return isCommentBlock(first);
192
192
  }
193
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "14.3.7",
3
+ "version": "14.5.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",
@@ -8,7 +8,8 @@
8
8
  "main": "./lib/printer.js",
9
9
  "exports": {
10
10
  ".": "./lib/printer.js",
11
- "./is": "./lib/tokenize/is.js"
11
+ "./is": "./lib/tokenize/is.js",
12
+ "./params": "./lib/tokenize/expressions/function/params.js"
12
13
  },
13
14
  "repository": {
14
15
  "type": "git",
@@ -33,7 +34,7 @@
33
34
  },
34
35
  "dependencies": {
35
36
  "@putout/babel": "^3.0.0",
36
- "@putout/compare": "^16.0.1",
37
+ "@putout/compare": "^17.0.0",
37
38
  "@putout/operate": "^13.0.0",
38
39
  "@putout/operator-json": "^2.0.0",
39
40
  "fullstore": "^3.0.0",
@@ -71,26 +72,26 @@
71
72
  "@putout/eslint": "^4.1.0",
72
73
  "@putout/plugin-minify": "^10.0.0",
73
74
  "@putout/plugin-printer": "^5.0.0",
74
- "@putout/plugin-promises": "^16.0.0",
75
- "@putout/plugin-react-hook-form": "^5.0.0",
76
- "@putout/plugin-react-hooks": "^7.0.0",
75
+ "@putout/plugin-promises": "^17.0.0",
76
+ "@putout/plugin-react-hook-form": "^6.0.0",
77
+ "@putout/plugin-react-hooks": "^8.0.1",
77
78
  "acorn": "^8.8.2",
78
79
  "c8": "^10.1.2",
79
- "check-dts": "^0.8.0",
80
+ "check-dts": "^0.9.0",
80
81
  "escover": "^4.0.1",
81
82
  "eslint": "^9.0.0",
82
83
  "eslint-plugin-putout": "^26.0.2",
83
- "estree-to-babel": "^10.0.0",
84
- "goldstein": "^5.14.0",
84
+ "estree-to-babel": "^11.0.2",
85
+ "goldstein": "^6.0.1",
85
86
  "just-kebab-case": "^4.2.0",
86
87
  "madrun": "^11.0.0",
87
88
  "mock-require": "^3.0.3",
88
89
  "montag": "^1.0.0",
89
90
  "nodemon": "^3.0.1",
90
- "putout": "^39.0.2",
91
+ "putout": "^40.0.1",
91
92
  "redlint": "^4.0.0",
92
- "samadhi": "^2.8.0",
93
- "supertape": "^10.0.0",
93
+ "samadhi": "^3.0.3",
94
+ "supertape": "^11.1.0",
94
95
  "try-catch": "^3.0.0",
95
96
  "typescript": "^5.3.3"
96
97
  },
package/tsconfig.json CHANGED
@@ -2,5 +2,6 @@
2
2
  "compilerOptions": {
3
3
  "target": "es2015",
4
4
  "skipLibCheck": true
5
- }
5
+ },
6
+ "include": ["lib/printer.d.ts", "test/*.ts"]
6
7
  }