New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@putout/compare

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/compare - npm Package Compare versions

Comparing version 9.12.1 to 9.13.0

13

lib/comparators.js

@@ -29,2 +29,3 @@ 'use strict';

isJSXText,
isTemplateElement,
} = require('@babel/types');

@@ -38,2 +39,3 @@

const comparators = [
compareTemplateElements,
compareJSXTexts,

@@ -93,2 +95,13 @@ compareAny,

function compareTemplateElements(node, template) {
if (!isTemplateElement(node) || !isTemplateElement(template))
return false;
const isValue = node.value.raw === template.value.raw;
const isCooked = node.value.cooked === template.value.cooked;
const isTail = node.tail === template.tail;
return isValue && isCooked && isTail;
}
function linkNodes(node, template, {add, templateStore}) {

@@ -95,0 +108,0 @@ if (node && isLinkedNode(template) || isLinkedArgs(template) || isLinkedId(node, template))

4

lib/link.js

@@ -7,2 +7,3 @@ 'use strict';

isStringLiteral,
isTemplateElement,
} = require('@babel/types');

@@ -19,2 +20,5 @@

return value;
if (isTemplateElement(node))
return node.value.cooked;
};

@@ -21,0 +25,0 @@

@@ -12,2 +12,5 @@ 'use strict';

isJSXElement,
isLiteral,
isTemplateLiteral,
TemplateElement,
} = require('@babel/types');

@@ -126,2 +129,8 @@

if (isLiteral(values[name]) && isTemplateLiteral(node)) {
const {value} = values[name];
nessy(way, TemplateElement({raw: value}), node);
continue;
}
nessy(way, values[name], node);

@@ -128,0 +137,0 @@ }

2

package.json
{
"name": "@putout/compare",
"version": "9.12.1",
"version": "9.13.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc