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

@stylable/core

Package Overview
Dependencies
Maintainers
6
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.11.1 to 5.12.0

11

dist/features/st-mixin.js

@@ -161,10 +161,11 @@ "use strict";

const decls = [];
rule.walkDecls((decl) => {
if (decl.prop === `-st-mixin` || decl.prop === `-st-partial-mixin`) {
decls.push(decl);
mixins = collectDeclMixins(context, resolvedSymbols, decl, (mixinSymbolName) => {
for (const node of rule.nodes) {
if (node.type === 'decl' &&
(node.prop === `-st-mixin` || node.prop === `-st-partial-mixin`)) {
decls.push(node);
mixins = collectDeclMixins(context, resolvedSymbols, node, (mixinSymbolName) => {
return mainNamespace[mixinSymbolName] === 'js' ? 'args' : 'named';
}, mixins);
}
});
}
return [decls, mixins];

@@ -171,0 +172,0 @@ }

@@ -427,12 +427,11 @@ "use strict";

if (errors) {
selectorNode.walkDecls((decl) => {
if (decl.prop === `-st-states`) {
for (const node of selectorNode.nodes) {
if (node.type === 'decl' && node.prop === `-st-states`) {
diagnostics.report(exports.stateDiagnostics.DEFAULT_PARAM_FAILS_VALIDATION(stateName, stateParam.defaultValue || '', errors), {
node: decl,
word: decl.value,
node: node,
word: node.value,
});
return false;
break;
}
return;
});
}
}

@@ -439,0 +438,0 @@ }

@@ -305,3 +305,6 @@ "use strict";

const defaultDecls = [];
node.walkDecls((decl) => {
for (const decl of node.nodes) {
if (decl.type !== 'decl') {
continue;
}
if (decl.prop === '-st-named') {

@@ -315,3 +318,3 @@ decl.assign({ value: named.join(', ') });

}
});
}
return { defaultDecls, namedDecls };

@@ -318,0 +321,0 @@ }

{
"name": "@stylable/core",
"version": "5.11.1",
"version": "5.12.0",
"description": "CSS for Components",

@@ -18,3 +18,3 @@ "main": "dist/index.js",

"cssesc": "^3.0.0",
"enhanced-resolve": "^5.14.1",
"enhanced-resolve": "^5.15.0",
"is-vendor-prefixed": "^4.0.0",

@@ -21,0 +21,0 @@ "lodash.clonedeep": "^4.5.0",

@@ -239,9 +239,12 @@ import { createFeature, FeatureTransformContext } from './feature';

const decls: postcss.Declaration[] = [];
rule.walkDecls((decl) => {
if (decl.prop === `-st-mixin` || decl.prop === `-st-partial-mixin`) {
decls.push(decl);
for (const node of rule.nodes) {
if (
node.type === 'decl' &&
(node.prop === `-st-mixin` || node.prop === `-st-partial-mixin`)
) {
decls.push(node);
mixins = collectDeclMixins(
context,
resolvedSymbols,
decl,
node,
(mixinSymbolName) => {

@@ -253,3 +256,3 @@ return mainNamespace[mixinSymbolName] === 'js' ? 'args' : 'named';

}
});
}
return [decls, mixins];

@@ -256,0 +259,0 @@ }

@@ -727,4 +727,4 @@ import type * as postcss from 'postcss';

if (errors) {
selectorNode.walkDecls((decl) => {
if (decl.prop === `-st-states`) {
for (const node of selectorNode.nodes) {
if (node.type === 'decl' && node.prop === `-st-states`) {
diagnostics.report(

@@ -737,10 +737,9 @@ stateDiagnostics.DEFAULT_PARAM_FAILS_VALIDATION(

{
node: decl,
word: decl.value,
node: node,
word: node.value,
}
);
return false;
break;
}
return;
});
}
}

@@ -747,0 +746,0 @@ }

@@ -416,3 +416,6 @@ import path from 'path';

const defaultDecls: Declaration[] = [];
node.walkDecls((decl) => {
for (const decl of node.nodes) {
if (decl.type !== 'decl') {
continue;
}
if (decl.prop === '-st-named') {

@@ -425,3 +428,3 @@ decl.assign({ value: named.join(', ') });

}
});
}
return { defaultDecls, namedDecls };

@@ -428,0 +431,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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