redlint 3.2.0 → 3.2.1
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 +5 -0
- package/lib/help.js +1 -1
- package/lib/master.js +7 -2
- package/lib/pack/pack.js +4 -3
- package/package.json +2 -1
package/ChangeLog
CHANGED
package/lib/help.js
CHANGED
|
@@ -18,6 +18,6 @@ export const help = ({header = true}) => {
|
|
|
18
18
|
generate - generate .filesystem.json file and exit
|
|
19
19
|
generate:simple - generate simple .filesystem.json file and exit
|
|
20
20
|
version - show version and exit
|
|
21
|
-
debug
|
|
21
|
+
debug - run commands without workers
|
|
22
22
|
`);
|
|
23
23
|
};
|
package/lib/master.js
CHANGED
|
@@ -3,7 +3,7 @@ import ora from 'ora';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import fullstore from 'fullstore';
|
|
5
5
|
|
|
6
|
-
export function masterLint(filesystem, {fix, start = setStart, end = setEnd, push = setPush, fail = setFail, success = setSuccess}) {
|
|
6
|
+
export function masterLint(filesystem, {fix, test, start = setStart, end = setEnd, push = setPush, fail = setFail, success = setSuccess}) {
|
|
7
7
|
return run(filesystem, {
|
|
8
8
|
fix,
|
|
9
9
|
start,
|
|
@@ -11,6 +11,7 @@ export function masterLint(filesystem, {fix, start = setStart, end = setEnd, pus
|
|
|
11
11
|
push,
|
|
12
12
|
fail,
|
|
13
13
|
success,
|
|
14
|
+
test,
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -73,12 +74,13 @@ function setEnd(data, resolve) {
|
|
|
73
74
|
resolve(data);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
function run(filesystem, {fix, start, end, push, fail, success}) {
|
|
77
|
+
function run(filesystem, {fix, start, end, push, fail, success, test}) {
|
|
77
78
|
return new Promise((resolve, reject) => {
|
|
78
79
|
const worker = new Worker(new URL('./slave.js', import.meta.url), {
|
|
79
80
|
workerData: {
|
|
80
81
|
filesystem,
|
|
81
82
|
fix,
|
|
83
|
+
test,
|
|
82
84
|
},
|
|
83
85
|
});
|
|
84
86
|
|
|
@@ -90,6 +92,9 @@ function run(filesystem, {fix, start, end, push, fail, success}) {
|
|
|
90
92
|
return;
|
|
91
93
|
}
|
|
92
94
|
|
|
95
|
+
if (test)
|
|
96
|
+
return;
|
|
97
|
+
|
|
93
98
|
if (event === 'rule:start') {
|
|
94
99
|
start(data, store);
|
|
95
100
|
return;
|
package/lib/pack/pack.js
CHANGED
|
@@ -3,17 +3,18 @@ import {
|
|
|
3
3
|
transform,
|
|
4
4
|
print,
|
|
5
5
|
} from 'putout';
|
|
6
|
+
|
|
6
7
|
import {createProgress} from '@putout/engine-runner/progress';
|
|
7
8
|
import * as pluginFilesystem from '@putout/plugin-filesystem';
|
|
8
9
|
import {
|
|
9
|
-
branch,
|
|
10
|
-
merge,
|
|
10
|
+
branch as originalBranch,
|
|
11
|
+
merge as originalMerge,
|
|
11
12
|
} from '@putout/processor-filesystem';
|
|
12
13
|
|
|
13
14
|
const [, readAllFiles] = pluginFilesystem.rules['read-all-files'];
|
|
14
15
|
const [, replaceCwd] = pluginFilesystem.rules['replace-cwd'];
|
|
15
16
|
|
|
16
|
-
export const pack = (from, filesystem, {progress = createProgress()} = {}) => {
|
|
17
|
+
export const pack = (from, filesystem, {progress = createProgress(), branch = originalBranch, merge = originalMerge} = {}) => {
|
|
17
18
|
const [{source}] = branch(filesystem);
|
|
18
19
|
const ast = parse(source);
|
|
19
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redlint",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Lint Filesystem with 🐊Putout",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@putout/engine-runner": "^20.1.0",
|
|
35
35
|
"@putout/formatter-codeframe": "^6.0.0",
|
|
36
36
|
"@putout/formatter-dump": "^4.0.1",
|
|
37
|
+
"@putout/operator-json": "^1.3.0",
|
|
37
38
|
"@putout/plugin-filesystem": "^3.6.0",
|
|
38
39
|
"@putout/processor-filesystem": "^3.0.0",
|
|
39
40
|
"chalk": "^5.3.0",
|