putout 35.16.2 → 35.17.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 +18 -0
- package/lib/cli/get-files.js +2 -2
- package/lib/cli/get-options.js +2 -2
- package/lib/cli/index.js +1 -1
- package/lib/cli/process-file.js +14 -2
- package/lib/cli/runner/writer.js +3 -3
- package/lib/cli/supported-files.js +1 -1
- package/lib/ignores.js +1 -1
- package/lib/parse-options/index.js +4 -4
- package/lib/parse-options/parse-sep.js +1 -1
- package/lib/parse-options/recursive-read.js +1 -1
- package/package.json +2 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
2024.04.28, v35.17.0
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- a87e7e06c @putout/plugin-nodejs: add-node-predynamic: Identifier
|
|
5
|
+
- ca542fb12 @putout/eslint: no config found: Flat Config error -> RC error
|
|
6
|
+
- 949e898c9 feature: @putout/plugin-nodejs: add-node-presimplify
|
|
7
|
+
- 1551e9f04 feature: @putout/plugin-nodejs: add-node-predynamic import
|
|
8
|
+
- 08acf9555 feature: @putout/plugin-nodejs: add-node-preadd require
|
|
9
|
+
- 6744c616f feature: @putout/plugin-nodejs: add-node-prereport
|
|
10
|
+
|
|
11
|
+
feature:
|
|
12
|
+
- 9f76b2a51 putout: @putout/quick-lint v1.0.0
|
|
13
|
+
- 8ad6cd673 @putout/eslint: add ability to hande no FlatConfig found error
|
|
14
|
+
- 949e898c9 @putout/plugin-nodejs: add-node-prefix: simplify
|
|
15
|
+
- 1551e9f04 @putout/plugin-nodejs: add-node-prefix: dynamic import
|
|
16
|
+
- 08acf9555 @putout/plugin-nodejs: add-node-prefix: add require
|
|
17
|
+
- 6744c616f @putout/plugin-nodejs: add-node-prefix: report
|
|
18
|
+
|
|
1
19
|
2024.04.26, v35.16.2
|
|
2
20
|
|
|
3
21
|
feature:
|
package/lib/cli/get-files.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {normalize} = require('path');
|
|
4
|
-
const {lstat} = require('fs/promises');
|
|
3
|
+
const {normalize} = require('node:path');
|
|
4
|
+
const {lstat} = require('node:fs/promises');
|
|
5
5
|
|
|
6
6
|
const fastGlob = require('fast-glob');
|
|
7
7
|
const tryToCatch = require('try-to-catch');
|
package/lib/cli/get-options.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const process = require('process');
|
|
4
|
-
const {join, dirname} = require('path');
|
|
3
|
+
const process = require('node:process');
|
|
4
|
+
const {join, dirname} = require('node:path');
|
|
5
5
|
|
|
6
6
|
const buildPlugins = require('./build-plugins');
|
|
7
7
|
const parseOptions = require('../parse-options');
|
package/lib/cli/index.js
CHANGED
package/lib/cli/process-file.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const tryToCatch = require('try-to-catch');
|
|
4
|
+
const eslint = require('@putout/eslint');
|
|
5
|
+
const quickLint = require('@putout/quick-lint');
|
|
4
6
|
|
|
5
7
|
const {putoutAsync} = require('../..');
|
|
6
8
|
const merge = require('../merge');
|
|
7
9
|
const parseMatch = require('../parse-options/parse-match');
|
|
8
10
|
|
|
9
|
-
const eslint = require('@putout/eslint');
|
|
10
11
|
const parseError = require('./parse-error');
|
|
11
12
|
|
|
12
13
|
const getMatchedOptions = (name, options) => {
|
|
@@ -30,8 +31,19 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({na
|
|
|
30
31
|
printer: configurePrinter(name, printer),
|
|
31
32
|
});
|
|
32
33
|
|
|
33
|
-
if (e)
|
|
34
|
+
if (e) {
|
|
34
35
|
raw && logError(e);
|
|
36
|
+
const quickLintPlaces = await quickLint(source, {
|
|
37
|
+
isTS,
|
|
38
|
+
isJSX: true,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (quickLintPlaces.length)
|
|
42
|
+
return {
|
|
43
|
+
places: quickLintPlaces,
|
|
44
|
+
code: source,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
35
47
|
|
|
36
48
|
const {code = source} = result || {};
|
|
37
49
|
const allPlaces = result ? result.places : parseError(e);
|
package/lib/cli/runner/writer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {resolve} = require('path');
|
|
4
|
-
const {cwd, env} = require('process');
|
|
5
|
-
const {readFileSync} = require('fs');
|
|
3
|
+
const {resolve} = require('node:path');
|
|
4
|
+
const {cwd, env} = require('node:process');
|
|
5
|
+
const {readFileSync} = require('node:fs');
|
|
6
6
|
|
|
7
7
|
const tryCatch = require('try-catch');
|
|
8
8
|
const getOptions = require('../get-options.js');
|
package/lib/ignores.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const process = require('process');
|
|
4
|
-
const {homedir} = require('os');
|
|
5
|
-
const {readdirSync} = require('fs');
|
|
3
|
+
const process = require('node:process');
|
|
4
|
+
const {homedir} = require('node:os');
|
|
5
|
+
const {readdirSync} = require('node:fs');
|
|
6
6
|
|
|
7
|
-
const {dirname, join} = require('path');
|
|
7
|
+
const {dirname, join} = require('node:path');
|
|
8
8
|
|
|
9
9
|
const once = require('once');
|
|
10
10
|
const tryCatch = require('try-catch');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.17.0",
|
|
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",
|
|
@@ -185,6 +185,7 @@
|
|
|
185
185
|
"@putout/processor-json": "^9.0.0",
|
|
186
186
|
"@putout/processor-markdown": "^12.0.0",
|
|
187
187
|
"@putout/processor-yaml": "^8.0.0",
|
|
188
|
+
"@putout/quick-lint": "^1.0.0",
|
|
188
189
|
"@putout/traverse": "^10.0.0",
|
|
189
190
|
"ajv": "^8.8.2",
|
|
190
191
|
"chalk": "^5.3.0",
|