putout 23.2.0 → 23.6.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,69 @@
1
+ 2022.01.09, v23.6.0
2
+
3
+ fix:
4
+ - (@putout/engine-runner) find: options
5
+ - (eslint-plugin-putout) add-newline-after-function-call: multiple empty lines
6
+ - feature(@putout/plugin-declare-undefined-variables) add fixtures
7
+ - feature(@putout/engine-runner) add support to clear replace watermarks after fix round is done
8
+ - (@putout/engine-parser) btoa: get back node v14 support
9
+ - (@putout/engine-parser) sourcemap url
10
+
11
+ feature:
12
+ - (package) @putout/plugin-nodejs v2.0.0
13
+ - (@putout/plugin-nodejs) drop support of putout < 23
14
+ - (@putout/plugin-nodejs) add convert-dirname-to-url
15
+ - (@putout/plugin-putout) declare: add isESM
16
+ - (package) @putout/plugin-convert-commonjs-to-esm v7.0.0
17
+ - (@putout/plugin-convert-commonjs-to-esm) drop support of putout < 23
18
+ - (@putout/plugin-convert-commonjs-to-esm) commonjs: use node.js built-ins, instead of simport
19
+ - (@putout/operator-declare) add ability to pass only "esm" or only "commonjs"
20
+ - (@putout/eslint-config) padding-line-between-statements: add newline before "for", after block-like
21
+ - (eslint-plugin-putout) add-newline-before-function-call: add support of AssignmentExpression
22
+ - (@putout/plugin-tape) add convert-equal-to-deep-equal
23
+ - (@putout/plugin-gitignore) add support of .idea
24
+ - (@putout/plugin-eslint) add apply-safe-align
25
+ - (eslint-plugin-putout) add safe+align
26
+ - (@putout/plugin-declare-undefined-variables) add fixtures
27
+ - (@putout/plugin-putout) declare: add compareAny, compareAll
28
+ - (@putout/plugin-putout) declare: add replaceWithMultiple
29
+ - (@putout/plugin-convert-commonjs-to-esm) require: add support of MemberExpression
30
+ - (@putout/plugin-tape) convert-equal-to-not-ok: add support of equal/notEqual with one argument passed
31
+ - (@putout/plugin-remove-useless-return) add support of nested functions
32
+ - (@putout/compare) is: parseTemplate: avoid caching exception as undefined
33
+ - (@putout/engine-runner) add support to clear replace watermarks after fix round is done
34
+
35
+
36
+ 2021.12.30, v23.5.0
37
+
38
+ fix:
39
+ - (eslint-plugin-putout) newline-function-call-arguments: exclude code contains quote
40
+
41
+ feature:
42
+ - (putout) add support of sourcemaps
43
+ - (@putout/engine-parser) add sourcemaps support
44
+
45
+
46
+ 2021.12.29, v23.4.0
47
+
48
+ feature:
49
+ - (package) @putout/plugin-package-json v2.0.0
50
+ - (@putout/package-json) drop support of putout < 23
51
+ - (@putout/plugin-putout) declare: add findProperties
52
+ - (@putout/plugin-package-json) add add-type
53
+ - (@putout/operate) add findProperties
54
+
55
+
56
+ 2021.12.26, v23.3.0
57
+
58
+ feature:
59
+ - (package) @putout/operate v6.13.0
60
+ - (package) @putout/plugin-convert-typeof-to-is-type v2.0.0
61
+ - (@putout/plugin-convert-typeof-to-is-type) drop support of putout < 23
62
+ - (@putout/plugin-convert-typeof-to-is-type) add support of MemberExpression
63
+ - (@putout/operate) getBinding/getBindingPath: name: string -> name: string | Node'
64
+ - (@putout/plugin-putout) add includer
65
+
66
+
1
67
  2021.12.25, v23.2.0
2
68
 
3
69
  feature:
@@ -135,7 +135,5 @@ const _readHomeOptions = once(() => {
135
135
  return data;
136
136
  });
137
137
 
138
- const _readCodeMods = once(() => {
139
- return readRules(home, '.putout');
140
- });
138
+ const _readCodeMods = once(() => readRules(home, '.putout'));
141
139
 
package/lib/putout.js CHANGED
@@ -40,10 +40,13 @@ module.exports = (source, opts) => {
40
40
  isTS,
41
41
  isFlow,
42
42
  isJSX,
43
+ sourceFileName,
44
+ sourceMapName,
43
45
  } = opts;
44
46
 
45
47
  const [clearSource, shebang] = cutShebang(source);
46
48
  const ast = parse(clearSource, {
49
+ sourceFileName,
47
50
  parser,
48
51
  isTS,
49
52
  isFlow,
@@ -58,7 +61,9 @@ module.exports = (source, opts) => {
58
61
  places,
59
62
  };
60
63
 
61
- const printed = print(ast);
64
+ const printed = print(ast, {
65
+ sourceMapName,
66
+ });
62
67
  const code = `${shebang}${printed}`;
63
68
 
64
69
  return {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "23.2.0",
3
+ "version": "23.6.0",
4
+ "type": "commonjs",
4
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
6
  "description": "🐊 Pluggable and configurable code transformer with built-in eslint and babel plugins support of js, jsx typescript, flow files, markdown, yaml and json",
6
7
  "homepage": "http://github.com/coderaiser/putout#readme",
@@ -64,7 +65,7 @@
64
65
  "@putout/formatter-progress": "^3.0.0",
65
66
  "@putout/formatter-progress-bar": "^2.0.0",
66
67
  "@putout/formatter-stream": "^3.0.0",
67
- "@putout/operate": "^6.0.0",
68
+ "@putout/operate": "^6.13.0",
68
69
  "@putout/operator-add-args": "^1.0.0",
69
70
  "@putout/operator-declare": "^2.0.0",
70
71
  "@putout/operator-regexp": "^1.0.0",
@@ -84,7 +85,7 @@
84
85
  "@putout/plugin-convert-assignment-to-arrow-function": "^1.0.0",
85
86
  "@putout/plugin-convert-assignment-to-comparison": "^1.0.0",
86
87
  "@putout/plugin-convert-bitwise-to-logical": "^1.0.0",
87
- "@putout/plugin-convert-commonjs-to-esm": "^6.0.0",
88
+ "@putout/plugin-convert-commonjs-to-esm": "^7.0.0",
88
89
  "@putout/plugin-convert-comparison-to-boolean": "^2.0.0",
89
90
  "@putout/plugin-convert-concat-to-flat": "^1.0.0",
90
91
  "@putout/plugin-convert-equal-to-strict-equal": "^1.0.0",
@@ -102,7 +103,7 @@
102
103
  "@putout/plugin-convert-template-to-string": "^1.0.0",
103
104
  "@putout/plugin-convert-to-arrow-function": "^3.0.0",
104
105
  "@putout/plugin-convert-top-level-return": "^4.0.0",
105
- "@putout/plugin-convert-typeof-to-is-type": "^1.0.0",
106
+ "@putout/plugin-convert-typeof-to-is-type": "^2.0.0",
106
107
  "@putout/plugin-declare-undefined-variables": "^6.0.0",
107
108
  "@putout/plugin-eslint": "^2.0.0",
108
109
  "@putout/plugin-extract-object-properties": "^6.0.0",
@@ -113,9 +114,9 @@
113
114
  "@putout/plugin-merge-destructuring-properties": "^5.0.0",
114
115
  "@putout/plugin-merge-duplicate-imports": "^4.0.0",
115
116
  "@putout/plugin-merge-if-statements": "^3.0.0",
116
- "@putout/plugin-nodejs": "^1.0.0",
117
+ "@putout/plugin-nodejs": "^2.0.0",
117
118
  "@putout/plugin-npmignore": "^2.0.0",
118
- "@putout/plugin-package-json": "^1.0.0",
119
+ "@putout/plugin-package-json": "^2.0.0",
119
120
  "@putout/plugin-promises": "^6.0.0",
120
121
  "@putout/plugin-putout": "^8.0.0",
121
122
  "@putout/plugin-putout-config": "^2.0.0",