@putout/engine-runner 16.0.1 → 16.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 +3 -3
- package/lib/store.js +3 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -363,12 +363,12 @@ module.exports.traverse = ({push, store}) => ({
|
|
|
363
363
|
When you need to update already saved values, use `upstore`:
|
|
364
364
|
|
|
365
365
|
```js
|
|
366
|
-
module.exports.traverse = ({push,
|
|
366
|
+
module.exports.traverse = ({push, upstore}) => ({
|
|
367
367
|
TSTypeAliasDeclaration(path) {
|
|
368
368
|
if (path.parentPath.isExportNamedDeclaration())
|
|
369
369
|
return;
|
|
370
370
|
|
|
371
|
-
|
|
371
|
+
upstore(path.node.id.name, {
|
|
372
372
|
path,
|
|
373
373
|
});
|
|
374
374
|
},
|
|
@@ -384,7 +384,7 @@ module.exports.traverse = ({push, store}) => ({
|
|
|
384
384
|
|
|
385
385
|
Program: {
|
|
386
386
|
exit() {
|
|
387
|
-
for (const {path, used} of
|
|
387
|
+
for (const {path, used} of upstore()) {
|
|
388
388
|
if (used)
|
|
389
389
|
continue;
|
|
390
390
|
|
package/lib/store.js
CHANGED
|
@@ -35,7 +35,9 @@ module.exports.upStore = createStore({
|
|
|
35
35
|
|
|
36
36
|
module.exports.upListStore = createStore({
|
|
37
37
|
get(map) {
|
|
38
|
-
|
|
38
|
+
const result = values(map).map(notRemoved);
|
|
39
|
+
|
|
40
|
+
return result;
|
|
39
41
|
},
|
|
40
42
|
set(map, name, data) {
|
|
41
43
|
map[name] = map[name] || new Set();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-runner",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Run 🐊Putout plugins",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/plugin-codemod-optional-catch-binding": "^7.7.4",
|
|
46
|
+
"@putout/plugin-minify": "*",
|
|
46
47
|
"c8": "^7.5.0",
|
|
47
48
|
"eslint": "^8.0.1",
|
|
48
49
|
"eslint-plugin-n": "^16.0.0",
|