@putout/engine-runner 16.0.0 → 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 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, store}) => ({
366
+ module.exports.traverse = ({push, upstore}) => ({
367
367
  TSTypeAliasDeclaration(path) {
368
368
  if (path.parentPath.isExportNamedDeclaration())
369
369
  return;
370
370
 
371
- store(path.node.id.name, {
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 store()) {
387
+ for (const {path, used} of upstore()) {
388
388
  if (used)
389
389
  continue;
390
390
 
@@ -164,7 +164,9 @@ function parseTo(to, values, path) {
164
164
  if (!isString(toStr))
165
165
  throw Error(`☝️ Looks like you passed 'replace' value with a wrong type. Allowed: 'string', 'node' and 'path'. Received: '${typeof toStr}' with value '${toStr}'.`);
166
166
 
167
- return template.ast.fresh(toStr);
167
+ const node = template.ast.fresh(toStr);
168
+
169
+ return node;
168
170
  }
169
171
 
170
172
  function validateMatchProperty(match) {
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
- return values(map).map(toArray);
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.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",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@babel/traverse": "^7.12.7",
28
28
  "@babel/types": "^7.12.7",
29
- "@putout/compare": "^9.0.0",
29
+ "@putout/compare": "^10.0.0",
30
30
  "@putout/engine-parser": "^6.0.0",
31
31
  "@putout/operate": "^8.0.0",
32
32
  "@putout/operator-declare": "^5.0.0",
@@ -43,9 +43,10 @@
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
- "eslint-plugin-n": "^15.2.4",
49
+ "eslint-plugin-n": "^16.0.0",
49
50
  "eslint-plugin-putout": "^17.0.0",
50
51
  "just-camel-case": "^4.0.2",
51
52
  "lerna": "^6.0.1",