putout 33.11.0 → 33.12.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,10 @@
1
+ 2023.11.24, v33.12.0
2
+
3
+ feature:
4
+ - 135e39656 putout: add ability to ignore missing files
5
+ - f23f62af6 @putout/operator-filesystem: readFileContent/writeFileContent: emoji support
6
+ - b3202c486 @putout/plugin-nodejs: rename-file-mjs-to-js: add
7
+
1
8
  2023.11.24, v33.11.0
2
9
 
3
10
  fix:
@@ -21,7 +21,27 @@ module.exports.lint = async ({raw, log, dir, resolvedName, options, readFile, fi
21
21
  processedSource,
22
22
  };
23
23
 
24
- rawSource = await readFile(resolvedName, 'utf8');
24
+ let readError;
25
+
26
+ [readError, rawSource] = await tryToCatch(readFile, resolvedName, 'utf8');
27
+
28
+ if (readError && readError.code !== 'ENOENT')
29
+ places.push({
30
+ rule: 'system',
31
+ message: readError.message,
32
+ position: {
33
+ line: 1,
34
+ column: 0,
35
+ },
36
+ });
37
+
38
+ if (readError)
39
+ return {
40
+ isProcessed,
41
+ places,
42
+ rawSource,
43
+ processedSource,
44
+ };
25
45
 
26
46
  const [error, result] = await tryToCatch(runProcessors, {
27
47
  name: resolvedName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "33.11.0",
3
+ "version": "33.12.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",