putout 35.37.1 → 36.0.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 +6 -0
- package/README.md +0 -1
- package/lib/cli/index.js +1 -2
- package/lib/cli/process-file.js +2 -2
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -226,7 +226,6 @@ putout lib --plugins remove-debugger,remove-unused-variables
|
|
|
226
226
|
- `ESLINT_CONFIG_FILE` - path to **ESLint** config file;
|
|
227
227
|
- `NO_ESLINT` - do not run **ESLint** after 🐊**Putout**;
|
|
228
228
|
- `NO_ESLINT_WARNINGS` - do not show **ESLint** warnings;
|
|
229
|
-
- `PUTOUT_PRINTER` - force 🐊**Putout** to use printers like `babel`, `putout` and `recast` to `parse()` and `print()`, useful for Babel Plugins to make locations output more accurate.
|
|
230
229
|
|
|
231
230
|
```sh
|
|
232
231
|
PUTOUT_FILES=lib,test putout --fix
|
package/lib/cli/index.js
CHANGED
|
@@ -51,7 +51,7 @@ const {isSupported} = supportedFiles;
|
|
|
51
51
|
const getFormatter = nanomemoize(require('@putout/engine-reporter/formatter').getFormatter);
|
|
52
52
|
|
|
53
53
|
const cwd = process.cwd();
|
|
54
|
-
const {PUTOUT_FILES = ''
|
|
54
|
+
const {PUTOUT_FILES = ''} = process.env;
|
|
55
55
|
const envNames = !PUTOUT_FILES ? [] : PUTOUT_FILES.split(',');
|
|
56
56
|
|
|
57
57
|
const getExitCode = (wasStop) => wasStop() ? WAS_STOP : OK;
|
|
@@ -257,7 +257,6 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile,
|
|
|
257
257
|
write,
|
|
258
258
|
transform,
|
|
259
259
|
plugins,
|
|
260
|
-
printer: PUTOUT_PRINTER,
|
|
261
260
|
};
|
|
262
261
|
|
|
263
262
|
const {places, exited} = await run({
|
package/lib/cli/process-file.js
CHANGED
|
@@ -17,10 +17,10 @@ const getMatchedOptions = (name, options) => {
|
|
|
17
17
|
return merge(options, parseMatch(name, options.match));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
module.exports = ({fix, fixCount, isFlow, logError, raw
|
|
20
|
+
module.exports = ({fix, fixCount, isFlow, logError, raw}) => async function processFile({name, source, startLine, options, again}) {
|
|
21
21
|
const {configurePrinter} = await import('./printer/printer.mjs');
|
|
22
22
|
const isTS = /\.tsx?$/.test(name) || /{tsx?}$/.test(name);
|
|
23
|
-
const matchedOptions = getMatchedOptions(name, options);
|
|
23
|
+
const {printer, ...matchedOptions} = getMatchedOptions(name, options);
|
|
24
24
|
|
|
25
25
|
const [e, result] = await tryToCatch(putoutAsync, source, {
|
|
26
26
|
fix,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.0.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",
|