putout 42.20.0 → 42.21.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,33 @@
1
+ 2026.10.10, v42.21.0
2
+
3
+ fix:
4
+ - 3471ff856 @putout/plugin-putout: sort-readm-file: sort-contents: no semicolon: exclude
5
+ - 10c7f28dc @putout/plugin-putout/convert-replacer-to-includer: no string: exclude
6
+ - 1aaa001ad @putout/plugin-logical-expressions: apply-destructuring: return: add missing "&&"
7
+
8
+ feature:
9
+ - 09e9b2f5a @putout/plugin-apply-to-sorted: add
10
+ - bb5b8419c @putout/plugin-promises: remove-useless-resolve: no args
11
+ - ef17cdeea @putout/plugin-putout: sort-readme-file: add-missing-semicolon: add
12
+ - 3f2c612b7 @putout/plugin-esm: remove-useless-slash: add
13
+ - 1aac0641b @putout/plugin-optional-chaining: convert-optional-to-logical-inside-for-of
14
+ - ee57110f9 @putout/plugin-optional-chaining: convert-optional-to-logical: __a?.__b !== __c -> !__a || __b !== __c
15
+ - 504ca50f6 @putout/plugin-putout: shorten-path-get
16
+ - ef3427f04 @putout/plugin-putout: remove-useless-type-check-declaration: add
17
+ - b796f46ed @putout/plugin-putout: apply-type-check: apply-type-check: VariableDeclarator: exclude
18
+ - 5980af95e @putout/plugin-logical-expressions: simplify: __a || __b && (__c || __a) -> __a || (__b && __c)
19
+ - aa613f86b @putout/plugin-logical-expressions: simplify: (__a || __b) && (__c || __a) -> __a || (__b && __c)
20
+ - e9e31b1ea @putout/plugin-putout: convert-replacer-to-includer: spread: exclude
21
+ - 6baebc223 @putout/plugin-putout: remove-useless-match: method: exclude
22
+ - 5a3da4a21 @putout/plugin-assign: simplify: spread: exclude
23
+ - 21e477748 @putout/plugin-putout: remove-useless-match
24
+ - 28e666b28 @putout/plugin-putout: convert-replacer-to-includer: add
25
+
26
+ 2026.09.28, v42.20.1
27
+
28
+ fix:
29
+ - c869b5c1d putout: parse-options: revert match more important then rule
30
+
1
31
  2026.09.28, v42.20.0
2
32
 
3
33
  fix:
@@ -11,7 +11,6 @@ import _defaultOptions from '../../putout.json' with {
11
11
  type: 'json',
12
12
  };
13
13
  import {mergeOptions} from './merge-options.js';
14
- import {applyMatchRules} from './apply-match-rules.js';
15
14
  import _recursiveRead from './recursive-read.js';
16
15
  import applyModuleTypeRules from './apply-module-type-rules.js';
17
16
  import {validateOptions} from './validate-options/index.js';
@@ -89,12 +88,6 @@ export const parseOptions = (info = {}, overrides = {}) => {
89
88
 
90
89
  const finalMergedOptions = mergeOptions(...resultOptionsList);
91
90
 
92
- const matched = parseMatch(name, options.match);
93
- const withMatchRules = applyMatchRules(finalMergedOptions.rules, matched.rules);
94
-
95
- if (withMatchRules !== finalMergedOptions.rules)
96
- finalMergedOptions.rules = withMatchRules;
97
-
98
91
  validateOptions(finalMergedOptions);
99
92
 
100
93
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "42.20.0",
3
+ "version": "42.21.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json",
@@ -105,6 +105,7 @@
105
105
  "@putout/plugin-apply-shorthand-properties": "^7.0.0",
106
106
  "@putout/plugin-apply-starts-with": "^2.0.0",
107
107
  "@putout/plugin-apply-template-literals": "^5.0.0",
108
+ "@putout/plugin-apply-to-sorted": "^1.0.0",
108
109
  "@putout/plugin-arguments": "^2.0.0",
109
110
  "@putout/plugin-assignment": "^3.0.0",
110
111
  "@putout/plugin-browserlist": "^2.0.0",
package/putout.json CHANGED
@@ -222,6 +222,7 @@
222
222
  "apply-shorthand-properties",
223
223
  "apply-starts-with",
224
224
  "apply-template-literals",
225
+ "apply-to-sorted",
225
226
  "apply-overrides",
226
227
  "arguments",
227
228
  "assignment",
@@ -1,29 +0,0 @@
1
- const {entries, keys} = Object;
2
-
3
- const cut = (a) => a.split('/')[0];
4
- const isEmpty = (a) => !keys(a).length;
5
- const isNested = (a) => a.includes('/');
6
-
7
- const isSuppressed = (matchRules, rule) => {
8
- if (Object.hasOwn(matchRules, rule))
9
- return true;
10
-
11
- return isNested(rule) && matchRules[cut(rule)] === 'off';
12
- };
13
-
14
- export const applyMatchRules = (rules, matchRules = {}) => {
15
- if (isEmpty(matchRules) || isEmpty(rules))
16
- return rules;
17
-
18
- const result = {};
19
-
20
- for (const [rule, value] of entries(rules)) {
21
- if (!isSuppressed(matchRules, rule))
22
- result[rule] = value;
23
- }
24
-
25
- return {
26
- ...result,
27
- ...matchRules,
28
- };
29
- };