putout 33.7.0 → 33.8.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 +12 -0
- package/lib/loader.mjs +3 -4
- package/package.json +1 -1
- package/putout.json +4 -0
package/ChangeLog
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
2023.11.18, v33.8.0
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- d79f6a49e putout: loader: use putoutAsync
|
|
5
|
+
|
|
6
|
+
feature:
|
|
7
|
+
- be92475be putout: enable nodejs filesystem rules
|
|
8
|
+
- a8e501db1 @putout/plugin-nodejs: mjs-file: add
|
|
9
|
+
- f85820fca @putout/plugin-nodejs: cjs-file: add
|
|
10
|
+
- 4e80a6f73 @putout/operator-match-files: add additional check of provided files
|
|
11
|
+
- be49cc530 @putout/operator-match-files: autodetect json/js
|
|
12
|
+
|
|
1
13
|
2023.11.17, v33.7.0
|
|
2
14
|
|
|
3
15
|
fix:
|
package/lib/loader.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
|
-
import
|
|
2
|
+
import {putoutAsync} from './putout.js';
|
|
3
3
|
import ignores from './ignores.js';
|
|
4
4
|
import parseOptions from './parse-options/index.js';
|
|
5
5
|
|
|
@@ -23,9 +23,8 @@ const toLoad = (transformSource) => async (url, context, defaultLoad) => {
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export const transformSource = (source, context) => {
|
|
26
|
+
export const transformSource = async (source, context) => {
|
|
27
27
|
const {url} = context;
|
|
28
|
-
|
|
29
28
|
const name = url.replace('file://', '');
|
|
30
29
|
|
|
31
30
|
const options = parseOptions({
|
|
@@ -37,7 +36,7 @@ export const transformSource = (source, context) => {
|
|
|
37
36
|
source,
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
const {code} =
|
|
39
|
+
const {code} = await putoutAsync(source, {
|
|
41
40
|
printer: 'putout',
|
|
42
41
|
...options,
|
|
43
42
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.8.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",
|
package/putout.json
CHANGED
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"setupTests.*": {
|
|
31
31
|
"remove-empty/import": "off"
|
|
32
32
|
},
|
|
33
|
+
".filesystem.json": {
|
|
34
|
+
"nodejs/cjs-file": "on",
|
|
35
|
+
"nodejs/mjs-file": "on"
|
|
36
|
+
},
|
|
33
37
|
"*.md": {
|
|
34
38
|
"conditions/apply-consistent-blocks": "off",
|
|
35
39
|
"conditions/convert-comparison-to-boolean": "off",
|