putout 35.37.1 → 36.0.1

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,16 @@
1
+ 2024.07.18, v36.0.1
2
+
3
+ feature:
4
+ - b6b1730e6 putout: @putout/plugin-remove-useless-variables v12.0.0
5
+ - d1be29ed0 @putout/plugin-remove-useless-variables: drop support of 🐊 < 36
6
+ - 9055ae93e @putout/plugin-remove-useless-variables: remove: init is MemberExpression (coderaiser/minify#125)
7
+
8
+ 2024.07.16, v36.0.0
9
+
10
+ feature:
11
+ - 9267d5340 putout: get rid of PUTOUT_PRINTER (#213)
12
+ - fa489a918 @putout/test: get rid of PUTOUT_PRINTER
13
+
1
14
  2024.07.15, v35.37.1
2
15
 
3
16
  feature:
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 = '', PUTOUT_PRINTER} = process.env;
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({
@@ -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, printer}) => async function processFile({name, source, startLine, options, again}) {
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": "35.37.1",
3
+ "version": "36.0.1",
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",
@@ -171,7 +171,7 @@
171
171
  "@putout/plugin-remove-useless-return": "^7.0.0",
172
172
  "@putout/plugin-remove-useless-spread": "^11.0.0",
173
173
  "@putout/plugin-remove-useless-template-expressions": "^2.0.0",
174
- "@putout/plugin-remove-useless-variables": "^11.0.0",
174
+ "@putout/plugin-remove-useless-variables": "^12.0.0",
175
175
  "@putout/plugin-reuse-duplicate-init": "^5.0.0",
176
176
  "@putout/plugin-simplify-assignment": "^3.0.0",
177
177
  "@putout/plugin-simplify-boolean-return": "^2.0.0",