@putout/engine-runner 14.0.1 β 14.1.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/README.md +8 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ npm i @putout/engine-runner
|
|
|
15
15
|
|
|
16
16
|
There is a couple plugin types supported by π**Putout**:
|
|
17
17
|
|
|
18
|
-
- β
[
|
|
19
|
-
- β
[
|
|
20
|
-
- β
[
|
|
21
|
-
- β
[
|
|
18
|
+
- β
[**Replacer**](#replacer)
|
|
19
|
+
- β
[**Includer**](#includer)
|
|
20
|
+
- β
[**Traverser**](#traverser)
|
|
21
|
+
- β
[**Finder**](#finder)
|
|
22
22
|
|
|
23
23
|
All of them supports subset of **JavaScript** π¦[**PutoutScript**](https://github.com/coderaiser/putout/blob/master/docs/putout-script.md#-putoutscript) described in [`@putout/compare`](https://github.com/coderaiser/putout/tree/master/packages/compare#readme).
|
|
24
24
|
|
|
@@ -145,7 +145,7 @@ module.exports.replace = () => ({
|
|
|
145
145
|
|
|
146
146
|
### Includer
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
**Includer** is the most preferable format of a plugin, simplest to use (after `Replacer`):
|
|
149
149
|
|
|
150
150
|
```js
|
|
151
151
|
module.exports.report = () => 'debugger statement should not be used';
|
|
@@ -178,7 +178,7 @@ Where `__` can be any node. All this possible with help of [@putout/compare](htt
|
|
|
178
178
|
|
|
179
179
|
### Traverser
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
**Traverser** gives you more power to `filter` and `fix` nodes you need.
|
|
182
182
|
|
|
183
183
|
```js
|
|
184
184
|
module.exports.report = () => 'debugger statement should not be used';
|
|
@@ -196,7 +196,7 @@ module.exports.traverse = ({push}) => ({
|
|
|
196
196
|
|
|
197
197
|
### Finder
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
**Finder** gives you all the control over traversing, but it's the slowest format.
|
|
200
200
|
Because `traversers` not merged in contrast with other plugin formats.
|
|
201
201
|
|
|
202
202
|
```js
|
|
@@ -308,7 +308,7 @@ module.exports.traverse = ({pathStore}) => ({
|
|
|
308
308
|
|
|
309
309
|
Program: {
|
|
310
310
|
exit() {
|
|
311
|
-
console.log(
|
|
311
|
+
console.log(pathStore());
|
|
312
312
|
// returns
|
|
313
313
|
[];
|
|
314
314
|
},
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-runner",
|
|
3
|
-
"version": "14.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Run πPutout plugins",
|
|
7
7
|
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/engine-runner#readme",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"commitType": "colon",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"eslint-plugin-n": "^15.2.4",
|
|
49
49
|
"eslint-plugin-putout": "^16.0.0",
|
|
50
50
|
"just-camel-case": "^4.0.2",
|
|
51
|
-
"lerna": "^
|
|
51
|
+
"lerna": "^6.0.1",
|
|
52
52
|
"madrun": "^9.0.0",
|
|
53
53
|
"mock-require": "^3.0.3",
|
|
54
54
|
"montag": "^1.0.0",
|
|
55
55
|
"nodemon": "^2.0.1",
|
|
56
56
|
"putout": "*",
|
|
57
|
-
"supertape": "^
|
|
57
|
+
"supertape": "^8.0.0"
|
|
58
58
|
},
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"engines": {
|