putout 26.9.3 → 26.10.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,14 @@
1
+ 2022.06.01, v26.10.0
2
+
3
+ fix:
4
+ - (@putout/cli-cache) canUseCache: no when places.length
5
+
6
+ feature:
7
+ - (putout) process-file: --disalble-all show places found by parsers other then javascript
8
+ - (package) @putout/cli-cache v1.1.0
9
+ - (@putout/cli-cache) drop support of node < 16
10
+ - (@putout/cli-cache) canUseCache: can even if places found
11
+
1
12
  2022.05.31, v26.9.3
2
13
 
3
14
  feature:
@@ -16,7 +16,7 @@ const getMatchedOptions = (name, options) => {
16
16
  return merge(options, parseMatch(name, options.match));
17
17
  };
18
18
 
19
- module.exports = ({fix, fixCount, isFlow, ruler = {}, logError, raw}) => async ({name, source, startLine, options}) => {
19
+ module.exports = ({fix, fixCount, isFlow, logError, raw}) => async ({name, source, startLine, options}) => {
20
20
  const isTS = /\.tsx?$/.test(name) || /{tsx?}$/.test(name);
21
21
  const matchedOptions = getMatchedOptions(name, options);
22
22
 
@@ -35,12 +35,6 @@ module.exports = ({fix, fixCount, isFlow, ruler = {}, logError, raw}) => async (
35
35
  const {code = source} = result || {};
36
36
  const allPlaces = result ? result.places : parseError(e);
37
37
 
38
- if (ruler.disable || ruler.enable || ruler.disableAll || ruler.enableAll)
39
- return {
40
- places: formatPlaces(startLine, allPlaces),
41
- code,
42
- };
43
-
44
38
  const [newCode, newPlaces] = await eslint({
45
39
  name,
46
40
  code,
@@ -48,7 +48,7 @@ module.exports = async ({readFile, report, writeFile, exit, raw, write, log, cur
48
48
  return exit(INVALID_CONFIG, configError);
49
49
 
50
50
  const {dir} = options;
51
- const [success, currentPlaces] = await runCache({
51
+ const success = await runCache({
52
52
  options,
53
53
  fileCache,
54
54
  report,
@@ -63,7 +63,6 @@ module.exports = async ({readFile, report, writeFile, exit, raw, write, log, cur
63
63
 
64
64
  if (success)
65
65
  return {
66
- places: currentPlaces,
67
66
  success,
68
67
  };
69
68
 
@@ -117,7 +116,7 @@ module.exports = async ({readFile, report, writeFile, exit, raw, write, log, cur
117
116
 
118
117
  async function runCache({fileCache, report, write, formatterOptions, currentFormat, name, resolvedName, index, count, options}) {
119
118
  if (!fileCache.canUseCache(name, options))
120
- return [false, []];
119
+ return false;
121
120
 
122
121
  const places = fileCache.getPlaces(name);
123
122
  const formatterProxy = createFormatterProxy({
@@ -133,6 +132,6 @@ async function runCache({fileCache, report, write, formatterOptions, currentForm
133
132
 
134
133
  write(line || '');
135
134
 
136
- return [true, places];
135
+ return true;
137
136
  }
138
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "26.9.3",
3
+ "version": "26.10.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 and babel plugins support of js, jsx typescript, flow files, markdown, yaml and json",
@@ -47,7 +47,7 @@
47
47
  "@babel/code-frame": "^7.10.4",
48
48
  "@babel/traverse": "^7.12.5",
49
49
  "@babel/types": "^7.12.6",
50
- "@putout/cli-cache": "^1.0.0",
50
+ "@putout/cli-cache": "^1.1.0",
51
51
  "@putout/cli-keypress": "^1.0.0",
52
52
  "@putout/cli-match": "^1.0.0",
53
53
  "@putout/cli-ruler": "^2.0.0",