putout 35.22.1 → 35.22.2

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
+ 2024.05.08, v35.22.2
2
+
3
+ feature:
4
+ - 1e3ca1f22 putout: run 🐊 after fixing syntax errors
5
+ - 807430337 eslint-plugin-putout: align-spaces: report
6
+ - 08e77aec0 @putout/plugin-putout: convert-replace-with: report
7
+ - 19908112b @putout/plugin-for-of: add-missing-star: delegate
8
+ - 3f41dd7de @putout/plugin-react: apply-create-root: add
9
+ - eb138c934 @putout/plugin-for-of: add-missing-star
10
+
1
11
  2024.05.07, v35.22.1
2
12
 
3
13
  feature:
@@ -18,7 +18,7 @@ const getMatchedOptions = (name, options) => {
18
18
  return merge(options, parseMatch(name, options.match));
19
19
  };
20
20
 
21
- module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({name, source, startLine, options}) => {
21
+ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async function processFile({name, source, startLine, options, again}) {
22
22
  const {configurePrinter} = await import('./printer/printer.mjs');
23
23
  const isTS = /\.tsx?$/.test(name) || /{tsx?}$/.test(name);
24
24
  const matchedOptions = getMatchedOptions(name, options);
@@ -32,7 +32,7 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({na
32
32
  printer: configurePrinter(name, printer),
33
33
  });
34
34
 
35
- if (e) {
35
+ if (!again && e) {
36
36
  raw && logError(e);
37
37
  const {places, code} = await lintSyntax(source, {
38
38
  fix,
@@ -46,10 +46,13 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({na
46
46
  };
47
47
 
48
48
  if (fix && !places.length)
49
- return {
50
- places,
51
- code,
52
- };
49
+ return await processFile({
50
+ again: true,
51
+ name,
52
+ source: code,
53
+ startLine,
54
+ options,
55
+ });
53
56
  }
54
57
 
55
58
  const {code = source} = result || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "35.22.1",
3
+ "version": "35.22.2",
4
4
  "type": "commonjs",
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",