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

@stylable/core

Package Overview
Dependencies
Maintainers
5
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 2.4.1-alpha.0 to 2.4.1-alpha.1

3

cjs/parser.js

@@ -11,4 +11,3 @@ "use strict";

const postcssConfig = { parser: postcssJS };
// any until issue resolved: https://github.com/postcss/postcss-nested/issues/88
const processor = postcss_1.default([postcss_nested_1.default]);
const processor = postcss_1.default([postcss_nested_1.default()]);
function cssObjectToAst(cssObject, sourceFile = '') {

@@ -15,0 +14,0 @@ return processor.process(cssObject, Object.assign({ from: sourceFile }, postcssConfig));

@@ -100,3 +100,3 @@ "use strict";

});
transformer.transformAst(mixinRoot, meta, undefined, variableOverride);
transformer.transformAst(mixinRoot, meta, undefined, variableOverride, [], true);
stylable_assets_1.fixRelativeUrls(mixinRoot, mix, meta);

@@ -114,3 +114,3 @@ stylable_utils_1.mergeRules(mixinRoot, rule);

const symbolName = isRootMixin ? 'default' : mix.mixin.type;
transformer.transformAst(mixinRoot, mixinMeta, undefined, resolvedArgs, path.concat(symbolName + ' from ' + meta.source));
transformer.transformAst(mixinRoot, mixinMeta, undefined, resolvedArgs, path.concat(symbolName + ' from ' + meta.source), true);
stylable_assets_1.fixRelativeUrls(mixinRoot, mix, meta);

@@ -154,3 +154,3 @@ return mixinRoot;

const mixinRoot = stylable_utils_1.createSubsetAst(meta.ast, '.' + mix.ref.name, undefined, isRootMixin);
transformer.transformAst(mixinRoot, isRootMixin ? meta : createInheritedMeta({ meta, symbol: mix.ref, _kind: 'css' }), undefined, resolvedArgs, path.concat(mix.mixin.type + ' from ' + meta.source));
transformer.transformAst(mixinRoot, isRootMixin ? meta : createInheritedMeta({ meta, symbol: mix.ref, _kind: 'css' }), undefined, resolvedArgs, path.concat(mix.mixin.type + ' from ' + meta.source), true);
stylable_utils_1.mergeRules(mixinRoot, rule);

@@ -157,0 +157,0 @@ }

@@ -81,3 +81,3 @@ import postcss from 'postcss';

transform(meta: StylableMeta): StylableResults;
transformAst(ast: postcss.Root, meta: StylableMeta, metaExports?: StylableExports, variableOverride?: Record<string, string>, path?: string[]): void;
transformAst(ast: postcss.Root, meta: StylableMeta, metaExports?: StylableExports, variableOverride?: Record<string, string>, path?: string[], mixinTransform?: boolean): void;
exportLocalVars(meta: StylableMeta, stVarsExport: Record<string, string>, variableOverride?: Record<string, string>): void;

@@ -84,0 +84,0 @@ exportCSSVars(cssVarsMapping: Record<string, string>, varsExport: Record<string, string>): void;

@@ -72,2 +72,4 @@ "use strict";

const ast = this.resetTransformProperties(meta);
this.resolver.validateImports(meta, this.diagnostics);
validateScopes(meta, this.resolver, this.diagnostics);
this.transformAst(ast, meta, metaExports);

@@ -79,7 +81,5 @@ this.transformGlobals(ast, meta);

}
transformAst(ast, meta, metaExports, variableOverride, path = []) {
transformAst(ast, meta, metaExports, variableOverride, path = [], mixinTransform = false) {
const keyframeMapping = this.scopeKeyframes(ast, meta);
const cssVarsMapping = this.createCSSVarsMapping(ast, meta);
this.resolver.validateImports(meta, this.diagnostics);
validateScopes(meta, this.resolver, this.diagnostics);
ast.walkRules((rule) => {

@@ -110,3 +110,3 @@ if (selector_utils_1.isChildOfAtRule(rule, 'keyframes')) {

if (USE_SCOPE_SELECTOR_2) {
if (this.mode === 'development') {
if (!mixinTransform && meta.outputAst && this.mode === 'development') {
this.addDevRules(meta);

@@ -113,0 +113,0 @@ }

{
"name": "@stylable/core",
"version": "2.4.1-alpha.0",
"version": "2.4.1-alpha.1",
"description": "CSS for Components",

@@ -25,3 +25,3 @@ "main": "./cjs/index.js",

"postcss-js": "^2.0.3",
"postcss-nested": "^4.2.0",
"postcss-nested": "^4.2.1",
"postcss-safe-parser": "^4.0.1",

@@ -48,3 +48,3 @@ "postcss-selector-matches": "^4.0.0",

"license": "BSD-3-Clause",
"gitHead": "d6d3e197927e688d6db4a831fb4285ad4c418df3"
"gitHead": "c6e3422189bc22520b11a48b2fcba9afed1dd135"
}

@@ -8,4 +8,3 @@ import postcss from 'postcss';

const postcssConfig = { parser: postcssJS };
// any until issue resolved: https://github.com/postcss/postcss-nested/issues/88
const processor = postcss([postcssNested as any]);
const processor = postcss([postcssNested()]);

@@ -12,0 +11,0 @@ export function cssObjectToAst(cssObject: CSSObject, sourceFile = '') {

@@ -147,3 +147,3 @@ import postcss from 'postcss';

transformer.transformAst(mixinRoot, meta, undefined, variableOverride);
transformer.transformAst(mixinRoot, meta, undefined, variableOverride, [], true);

@@ -195,3 +195,4 @@ fixRelativeUrls(mixinRoot, mix, meta);

resolvedArgs,
path.concat(symbolName + ' from ' + meta.source)
path.concat(symbolName + ' from ' + meta.source),
true
);

@@ -293,3 +294,4 @@

resolvedArgs,
path.concat(mix.mixin.type + ' from ' + meta.source)
path.concat(mix.mixin.type + ' from ' + meta.source),
true
);

@@ -296,0 +298,0 @@ mergeRules(mixinRoot, rule);

@@ -177,2 +177,4 @@ import cloneDeep from 'lodash.clonedeep';

const ast = this.resetTransformProperties(meta);
this.resolver.validateImports(meta, this.diagnostics);
validateScopes(meta, this.resolver, this.diagnostics);
this.transformAst(ast, meta, metaExports);

@@ -190,8 +192,7 @@ this.transformGlobals(ast, meta);

variableOverride?: Record<string, string>,
path: string[] = []
path: string[] = [],
mixinTransform = false
) {
const keyframeMapping = this.scopeKeyframes(ast, meta);
const cssVarsMapping = this.createCSSVarsMapping(ast, meta);
this.resolver.validateImports(meta, this.diagnostics);
validateScopes(meta, this.resolver, this.diagnostics);

@@ -245,4 +246,5 @@ ast.walkRules((rule: SRule) => {

});
if (USE_SCOPE_SELECTOR_2) {
if (this.mode === 'development') {
if (!mixinTransform && meta.outputAst && this.mode === 'development') {
this.addDevRules(meta);

@@ -249,0 +251,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