@putout/plugin-putout 29.33.3 → 29.33.4

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.
@@ -3,6 +3,7 @@ import {types, operator} from 'putout';
3
3
  const {
4
4
  isTemplateLiteral,
5
5
  isStringLiteral,
6
+ isVariableDeclarator,
6
7
  } = types;
7
8
 
8
9
  const {extract} = operator;
@@ -25,7 +26,10 @@ export const replace = () => ({
25
26
  },
26
27
  });
27
28
 
28
- function check({__b}) {
29
+ function check({__b}, path) {
30
+ if (isVariableDeclarator(path.parentPath.parentPath))
31
+ return false;
32
+
29
33
  if (!isStringLiteral(__b) && !isTemplateLiteral(__b))
30
34
  return false;
31
35
 
@@ -36,12 +36,12 @@ export const traverse = ({push}) => ({
36
36
  'export const replace = () => __object': (path) => {
37
37
  const __objectPath = path.get('declaration.declarations.0.init.body');
38
38
  const properties = __objectPath.get('properties');
39
- const fileteredProperties = properties.filter(isObjectProperty);
39
+ const filteredProperties = properties.filter(isObjectProperty);
40
40
 
41
- if (!fileteredProperties.length)
41
+ if (!filteredProperties.length)
42
42
  return;
43
43
 
44
- for (const property of fileteredProperties) {
44
+ for (const property of filteredProperties) {
45
45
  const {
46
46
  key,
47
47
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "29.33.3",
3
+ "version": "29.33.4",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",