Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stylable/core

Package Overview
Dependencies
Maintainers
7
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/core - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

35

dist/custom-values.js

@@ -108,18 +108,29 @@ "use strict";

}
else if (valueNodes.length === 1) {
const valueNode = valueNodes[0];
resolvedValue = valueNode.resolvedValue;
if (!resolvedValue) {
const ct = customTypes[valueNode.value];
if (valueNode.type === 'function' && ct) {
resolvedValue = ct.evalVarAst(valueNode, customTypes, boxPrimitive);
else {
const nonComments = valueNodes.filter((node) => node.type !== 'comment');
if (nonComments.length === 1) {
const valueNode = nonComments[0];
resolvedValue = valueNode.resolvedValue;
if (!resolvedValue) {
const ct = customTypes[valueNode.value];
if (valueNode.type === 'function' && ct) {
resolvedValue = ct.evalVarAst(valueNode, customTypes, boxPrimitive);
}
else {
resolvedValue = unbox((0, value_1.getStringValue)(valueNode), !boxPrimitive);
}
}
else {
resolvedValue = unbox((0, value_1.getStringValue)(valueNode), !boxPrimitive);
else if (typeof resolvedValue === 'string') {
const parsedArg = (0, postcss_value_parser_1.default)(resolvedValue).nodes[0];
const ct = parsedArg.type === 'function' && parsedArg.value;
resolvedValue =
typeof ct === 'string' && customTypes[ct]
? customTypes[ct].evalVarAst(parsedArg, customTypes, boxPrimitive)
: unbox(resolvedValue, !boxPrimitive);
}
}
else {
resolvedValue = unbox((0, value_1.getStringValue)(valueNodes), !boxPrimitive);
}
}
else {
resolvedValue = unbox((0, value_1.getStringValue)(valueNodes), !boxPrimitive);
}
if (resolvedValue) {

@@ -126,0 +137,0 @@ outputMap[prop.value] = resolvedValue;

{
"name": "@stylable/core",
"version": "5.2.0",
"version": "5.2.1",
"description": "CSS for Components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -146,16 +146,26 @@ import cloneDeepWith from 'lodash.clonedeepwith';

// TODO: error
} else if (valueNodes.length === 1) {
const valueNode = valueNodes[0];
resolvedValue = valueNode.resolvedValue;
} else {
const nonComments = valueNodes.filter((node) => node.type !== 'comment');
if (nonComments.length === 1) {
const valueNode = nonComments[0];
resolvedValue = valueNode.resolvedValue;
if (!resolvedValue) {
const ct = customTypes[valueNode.value];
if (valueNode.type === 'function' && ct) {
resolvedValue = ct.evalVarAst(valueNode, customTypes, boxPrimitive);
} else {
resolvedValue = unbox(getStringValue(valueNode), !boxPrimitive);
if (!resolvedValue) {
const ct = customTypes[valueNode.value];
if (valueNode.type === 'function' && ct) {
resolvedValue = ct.evalVarAst(valueNode, customTypes, boxPrimitive);
} else {
resolvedValue = unbox(getStringValue(valueNode), !boxPrimitive);
}
} else if (typeof resolvedValue === 'string') {
const parsedArg = postcssValueParser(resolvedValue).nodes[0];
const ct = parsedArg.type === 'function' && parsedArg.value;
resolvedValue =
typeof ct === 'string' && customTypes[ct]
? customTypes[ct].evalVarAst(parsedArg, customTypes, boxPrimitive)
: unbox(resolvedValue, !boxPrimitive);
}
} else {
resolvedValue = unbox(getStringValue(valueNodes), !boxPrimitive);
}
} else {
resolvedValue = unbox(getStringValue(valueNodes), !boxPrimitive);
}

@@ -162,0 +172,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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