@putout/printer 18.3.2 → 18.3.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.09, v18.3.3
2
+
3
+ feature:
4
+ - 088dab9 @putout/printer: type-checker: array -> set
5
+
1
6
  2026.03.09, v18.3.2
2
7
 
3
8
  feature:
@@ -16,13 +16,13 @@ export const createTypeChecker = (typeNames, overrides = {}) => {
16
16
  } = overrides;
17
17
 
18
18
  const tuples = parseTypeNames(typeNames);
19
- const checkers = [];
20
- const results = [];
19
+ const checkers = new Set();
20
+ const results = new Set();
21
21
 
22
22
  for (const [operation, typeName] of tuples) {
23
23
  const [result, selector, not] = parseOperation(operation);
24
- results.push(result);
25
- checkers.push({
24
+ results.add(result);
25
+ checkers.add({
26
26
  result,
27
27
  selector,
28
28
  not,
@@ -56,6 +56,6 @@ export const createTypeChecker = (typeNames, overrides = {}) => {
56
56
  };
57
57
 
58
58
  function validateResults(results) {
59
- if (!results.includes(true))
59
+ if (!results.has(true))
60
60
  throw Error(`☝️Looks like type checker missing successful route ('+'), it will always fail`);
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.3.2",
3
+ "version": "18.3.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",