@putout/compare
Advanced tools
Comparing version 11.2.0 to 12.0.0
@@ -29,2 +29,3 @@ 'use strict'; | ||
const {types} = require('@putout/babel'); | ||
const { | ||
@@ -35,3 +36,3 @@ isClassBody, | ||
isTemplateElement, | ||
} = require('@babel/types'); | ||
} = types; | ||
@@ -38,0 +39,0 @@ const isEmptyBlock = (a) => isBlock(a) && !a.body.length; |
'use strict'; | ||
const {template} = require('@putout/engine-parser'); | ||
const {types} = require('@putout/babel'); | ||
const { | ||
isIdentifier, | ||
isExpressionStatement, | ||
isStringLiteral, | ||
} = require('@babel/types'); | ||
const { | ||
findVarsWays, | ||
@@ -34,2 +29,8 @@ getValues, | ||
const { | ||
isIdentifier, | ||
isExpressionStatement, | ||
isStringLiteral, | ||
} = types; | ||
const {keys} = Object; | ||
@@ -36,0 +37,0 @@ const {isArray} = Array; |
'use strict'; | ||
const {template} = require('@putout/engine-parser'); | ||
const {types} = require('@putout/babel'); | ||
const { | ||
@@ -19,3 +19,3 @@ isBlockStatement, | ||
isTSTypeReference, | ||
} = require('@babel/types'); | ||
} = types; | ||
@@ -279,5 +279,4 @@ const isStr = (a) => typeof a === 'string'; | ||
if (isTSTypeReference(a) && LINKED_NODE.test(a.typeName.name)) { | ||
if (isTSTypeReference(a) && LINKED_NODE.test(a.typeName.name)) | ||
return true; | ||
} | ||
@@ -284,0 +283,0 @@ return isTSTypeParameter(a) && LINKED_NODE.test(a.name); |
'use strict'; | ||
const {types} = require('@putout/babel'); | ||
const { | ||
@@ -9,3 +10,3 @@ isIdentifier, | ||
isTSTypeReference, | ||
} = require('@babel/types'); | ||
} = types; | ||
@@ -40,2 +41,5 @@ const parseName = (node) => { | ||
if (isTSTypeReference(templateStore[name]) && isIdentifier(nodeValue)) | ||
return true; | ||
add(templateStore[name], nodeValue); | ||
@@ -42,0 +46,0 @@ |
'use strict'; | ||
const traverse = require('@babel/traverse').default; | ||
const jessy = require('jessy'); | ||
const nessy = require('nessy'); | ||
const {traverse, types} = require('@putout/babel'); | ||
const {template} = require('@putout/engine-parser'); | ||
@@ -11,11 +11,2 @@ | ||
const { | ||
isIdentifier, | ||
isStatement, | ||
isJSXElement, | ||
isLiteral, | ||
isTemplateLiteral, | ||
TemplateElement, | ||
} = require('@babel/types'); | ||
const { | ||
is, | ||
@@ -29,2 +20,11 @@ isArgsStr, | ||
const { | ||
isIdentifier, | ||
isStatement, | ||
isJSXElement, | ||
isLiteral, | ||
isTemplateLiteral, | ||
TemplateElement, | ||
} = types; | ||
const {entries} = Object; | ||
@@ -67,7 +67,7 @@ const isNumber = (a) => typeof a === 'number'; | ||
'Identifier|BooleanLiteral|StringLiteral|TemplateElement|RegExpLiteral|JSXText|JSXAttribute|TSTypeReference'(path) { | ||
const {node} = path; | ||
if (isInsideTypeReference(path)) | ||
return; | ||
const {node} = path; | ||
const way = []; | ||
@@ -74,0 +74,0 @@ const name = extract(node); |
{ | ||
"name": "@putout/compare", | ||
"version": "11.2.0", | ||
"version": "12.0.0", | ||
"type": "commonjs", | ||
@@ -27,4 +27,3 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
"dependencies": { | ||
"@babel/traverse": "^7.12.5", | ||
"@babel/types": "^7.12.6", | ||
"@putout/babel": "^1.0.5", | ||
"@putout/engine-parser": "^7.0.0", | ||
@@ -45,3 +44,3 @@ "@putout/operate": "^9.0.0", | ||
"eslint-plugin-n": "^16.0.0", | ||
"eslint-plugin-putout": "^18.0.0", | ||
"eslint-plugin-putout": "^19.0.0", | ||
"just-camel-case": "^4.0.2", | ||
@@ -48,0 +47,0 @@ "lerna": "^6.0.1", |
@@ -224,3 +224,3 @@ # @putout/compare [![NPM version][NPMIMGURL]][NPMURL] | ||
##### __boolean | ||
##### __bool | ||
@@ -230,3 +230,3 @@ Any `Boolean` | ||
```js | ||
compare('const a = true', 'const a = __boolean'); | ||
compare('const a = true', 'const a = __bool'); | ||
// returns | ||
@@ -233,0 +233,0 @@ true; |
27183
6
667
+ Added@putout/babel@^1.0.5
+ Added@putout/babel@1.6.1(transitive)
+ Added@putout/compare@11.2.0(transitive)
- Removed@babel/traverse@^7.12.5
- Removed@babel/types@^7.12.6