@putout/printer 18.40.1 → 18.40.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,13 @@
1
+ 2026.08.24, v18.40.3
2
+
3
+ feature:
4
+ - 7224970a @putout/printer: type checker: throw when not not "!"
5
+
6
+ 2026.08.22, v18.40.2
7
+
8
+ fix:
9
+ - 8134ac8f @putout/printer: json, sql
10
+
1
11
  2026.08.21, v18.40.1
2
12
 
3
13
  feature:
package/lib/printer.js CHANGED
@@ -7,12 +7,12 @@ export {maybeVisitor} from './tokenize/maybe/index.js';
7
7
  export * as visitors from './tokenize/visitors.js';
8
8
 
9
9
  export const print = (ast, overrides = {}) => {
10
+ let options = overrides;
10
11
  check(ast);
11
12
 
12
- const options = {
13
- ...maybeJSON(ast, overrides),
14
- ...maybeSQL(ast, overrides),
15
- };
13
+ for (const maybe of [maybeJSON, maybeSQL]) {
14
+ options = maybe(ast, options);
15
+ }
16
16
 
17
17
  const tokens = tokenize(ast, options);
18
18
 
@@ -13,6 +13,9 @@ export const parseOperation = (operation) => {
13
13
 
14
14
  const [selector, not] = command.split(/ ->\s?/);
15
15
 
16
+ if (not && not !== '!')
17
+ throw Error(`☝️Looks like not: '${not}', it must be empty or '!' in checker: '${operation}'`);
18
+
16
19
  return [parsedResult, selector.trim(), not];
17
20
  };
18
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.40.1",
3
+ "version": "18.40.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",
@@ -79,6 +79,8 @@
79
79
  "@babel/parser": "^8.0.0",
80
80
  "@putout/eslint": "^6.0.0",
81
81
  "@putout/eslint-flat": "^4.0.0",
82
+ "@putout/operator-filesystem": "^11.2.1",
83
+ "@putout/operator-match-files": "^12.4.1",
82
84
  "@putout/plugin-minify": "^12.0.0",
83
85
  "@putout/plugin-printer": "^8.0.0",
84
86
  "@putout/plugin-promises": "^20.0.0",