putout 34.0.9 → 34.1.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,26 @@
1
+ 2023.12.15, v34.1.0
2
+
3
+ fix:
4
+ - 33a899efb @putout/plugin-nodejs: disable convert-mjs-to-js
5
+
6
+ feature:
7
+ - 071e46a10 putout: @putout/plugin-remove-duplicate-keys v4.0.0
8
+ - 71c7f5296 putout: add progress
9
+ - d1dbf802c @putout/plugin-remove-duplicate-keys: drop support of node < 18
10
+ - 447da2448 @putout/plugin-remove-duplicate-keys: improve support
11
+ - 2205df2da @putout/operate: traverseProperties: extract
12
+ - 09f3035d6 @putout/operate: traverseProperties: exclude SpreadElement
13
+ - 18ad54613 @putout/operate: traverseProperties: firstLevel
14
+ - 1f31aca61 @putout/operate: getProperties: SpreadElement
15
+ - c24c98f0b @putout/engine-runner: progress
16
+
17
+ 2023.12.13, v34.0.10
18
+
19
+ feature:
20
+ - 20debfa7a putout: @putout/plugin-putout v18.0.0
21
+ - f6508a0dc @putout/plugin-putout: drop support of 🐊 < 34
22
+ - ea81da134 @putout/plugin-putout: apply-short-processors: number used as ObjectProperty value
23
+
1
24
  2023.12.12, v34.0.9
2
25
 
3
26
  fix:
package/lib/cli/report.js CHANGED
@@ -7,6 +7,7 @@ module.exports = () => {
7
7
  return async (formatter, options) => {
8
8
  const {
9
9
  name,
10
+ rule,
10
11
  source,
11
12
  places,
12
13
  index = 0,
@@ -20,6 +21,7 @@ module.exports = () => {
20
21
  errorsCount += places.length;
21
22
 
22
23
  return await formatter({
24
+ rule,
23
25
  name,
24
26
  options: formatterOptions,
25
27
  source,
@@ -2,6 +2,7 @@
2
2
 
3
3
  const loader = require('@putout/engine-loader');
4
4
  const runner = require('@putout/engine-runner');
5
+ const {createProgress} = require('@putout/engine-runner/progress');
5
6
 
6
7
  module.exports.defaultOptions = (opts = {}) => {
7
8
  const {
@@ -12,6 +13,7 @@ module.exports.defaultOptions = (opts = {}) => {
12
13
  loadPlugins = loader.loadPlugins,
13
14
  loadPluginsAsync = loader.loadPluginsAsync,
14
15
  runPlugins = runner.runPlugins,
16
+ progress = createProgress(),
15
17
  } = opts;
16
18
 
17
19
  return {
@@ -23,5 +25,6 @@ module.exports.defaultOptions = (opts = {}) => {
23
25
  loadPlugins,
24
26
  loadPluginsAsync,
25
27
  runPlugins,
28
+ progress,
26
29
  };
27
30
  };
package/lib/ignores.js CHANGED
@@ -16,6 +16,8 @@ module.exports = (dirOpt, resolvedName, options = {}) => {
16
16
  return dirOpt && ignorer.ignores(relativeName);
17
17
  };
18
18
 
19
+ module.exports.mergeIgnores = mergeIgnores;
20
+
19
21
  function mergeIgnores(ignores) {
20
22
  for (const [i, str] of ignores.entries()) {
21
23
  const positiveIndex = ignores.indexOf(positive(str));
package/lib/transform.js CHANGED
@@ -23,6 +23,7 @@ module.exports.transform = (ast, source, opts) => {
23
23
  fixCount,
24
24
  loadPlugins,
25
25
  runPlugins,
26
+ progress,
26
27
  } = opts;
27
28
 
28
29
  const [, shebang] = cutShebang(source);
@@ -39,6 +40,7 @@ module.exports.transform = (ast, source, opts) => {
39
40
  fix,
40
41
  fixCount,
41
42
  plugins,
43
+ progress,
42
44
  });
43
45
 
44
46
  return places;
@@ -55,6 +57,7 @@ module.exports.transformAsync = async (ast, source, opts) => {
55
57
  fixCount,
56
58
  loadPluginsAsync,
57
59
  runPlugins,
60
+ progress,
58
61
  } = opts;
59
62
 
60
63
  const [, shebang] = cutShebang(source);
@@ -71,6 +74,7 @@ module.exports.transformAsync = async (ast, source, opts) => {
71
74
  fix,
72
75
  fixCount,
73
76
  plugins,
77
+ progress,
74
78
  });
75
79
 
76
80
  return places;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "34.0.9",
3
+ "version": "34.1.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",
@@ -22,7 +22,8 @@
22
22
  "./lint/json": "./lib/lint/json.mjs",
23
23
  "./transform": "./lib/transform.js",
24
24
  "./find-places": "./lib/find-places.js",
25
- "./register": "./lib/loader/register.mjs"
25
+ "./register": "./lib/loader/register.mjs",
26
+ "./ignores": "./lib/ignores.js"
26
27
  },
27
28
  "bin": {
28
29
  "putout": "bin/putout.mjs"
@@ -125,14 +126,14 @@
125
126
  "@putout/plugin-npmignore": "^3.0.0",
126
127
  "@putout/plugin-package-json": "^6.0.0",
127
128
  "@putout/plugin-promises": "^14.0.0",
128
- "@putout/plugin-putout": "^17.0.0",
129
+ "@putout/plugin-putout": "^18.0.0",
129
130
  "@putout/plugin-putout-config": "^4.0.0",
130
131
  "@putout/plugin-regexp": "^8.0.0",
131
132
  "@putout/plugin-remove-console": "^6.0.0",
132
133
  "@putout/plugin-remove-constant-conditions": "^4.0.0",
133
134
  "@putout/plugin-remove-debugger": "^5.0.0",
134
135
  "@putout/plugin-remove-duplicate-case": "^3.0.0",
135
- "@putout/plugin-remove-duplicate-keys": "^3.0.0",
136
+ "@putout/plugin-remove-duplicate-keys": "^4.0.0",
136
137
  "@putout/plugin-remove-empty": "^11.0.0",
137
138
  "@putout/plugin-remove-iife": "^4.0.0",
138
139
  "@putout/plugin-remove-nested-blocks": "^6.0.0",