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.5.0 to 5.6.0

7

dist/helpers/import.js

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

for (const [kind, namedTyped] of Object.entries(imports.tagged)) {
for (const [impName, impAsName] of Object.entries(namedTyped)) {
if (!namedTyped) {
continue;
}
for (const [impName, impAsName] of namedTyped) {
(_a = (_c = importObj.typed)[kind]) !== null && _a !== void 0 ? _a : (_c[kind] = {});

@@ -189,3 +192,3 @@ importObj.typed[kind][impAsName] = impName;

if (imports.named) {
for (const [impName, impAsName] of Object.entries(imports.named)) {
for (const [impName, impAsName] of imports.named) {
importObj.named[impAsName] = impName;

@@ -192,0 +195,0 @@ }

@@ -69,2 +69,3 @@ import * as postcss from 'postcss';

private getResolvedSymbols;
private directiveNodes;
constructor(options: TransformerOptions);

@@ -71,0 +72,0 @@ transform(meta: StylableMeta): StylableResults;

@@ -51,2 +51,3 @@ "use strict";

this.evaluator = new functions_1.StylableEvaluator();
this.directiveNodes = [];
this.diagnostics = options.diagnostics;

@@ -187,2 +188,7 @@ this.keepValues = options.keepValues || false;

}
if (this.mode === 'production') {
if (decl.prop.startsWith('-st-')) {
this.directiveNodes.push(decl);
}
}
switch (decl.prop) {

@@ -217,2 +223,5 @@ case `-st-partial-mixin`:

features_2.STGlobal.hooks.transformLastPass(lastPassParams);
for (const node of this.directiveNodes) {
node.remove();
}
}

@@ -219,0 +228,0 @@ if (metaExports) {

@@ -13,3 +13,2 @@ import type * as postcss from 'postcss';

removeComments?: boolean;
removeStylableDirectives?: boolean;
removeUnusedComponents?: boolean;

@@ -26,5 +25,4 @@ classNameOptimizations?: boolean;

optimizeAst(config: OptimizeConfig, targetAst: postcss.Root, usageMapping: Record<string, boolean>, jsExports: StylableExports, globals: Record<string, boolean>): void;
removeStylableDirectives(root: postcss.Root, shouldComment?: boolean): void;
}
export type ModuleResolver = (directoryPath: string, request: string) => string;
//# sourceMappingURL=types.d.ts.map
{
"name": "@stylable/core",
"version": "5.5.0",
"version": "5.6.0",
"description": "CSS for Components",

@@ -15,7 +15,6 @@ "main": "dist/index.js",

"@tokey/css-selector-parser": "^0.6.1",
"@tokey/imports-parser": "^0.1.2",
"@tokey/imports-parser": "^1.0.0",
"balanced-match": "^2.0.0",
"css-selector-tokenizer": "^0.8.0",
"cssesc": "^3.0.0",
"deindent": "^0.1.0",
"enhanced-resolve": "^5.12.0",

@@ -22,0 +21,0 @@ "is-vendor-prefixed": "^4.0.0",

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

for (const [kind, namedTyped] of Object.entries(imports.tagged)) {
for (const [impName, impAsName] of Object.entries(namedTyped)) {
if (!namedTyped) {
continue;
}
for (const [impName, impAsName] of namedTyped) {
importObj.typed[kind] ??= {};

@@ -279,3 +282,3 @@ importObj.typed[kind][impAsName] = impName;

if (imports.named) {
for (const [impName, impAsName] of Object.entries(imports.named)) {
for (const [impName, impAsName] of imports.named) {
importObj.named[impAsName] = impName;

@@ -282,0 +285,0 @@ }

@@ -125,2 +125,3 @@ import isVendorPrefixed from 'is-vendor-prefixed';

private getResolvedSymbols: ReturnType<typeof createSymbolResolverWithCache>;
private directiveNodes: postcss.Declaration[] = [];
constructor(options: TransformerOptions) {

@@ -273,2 +274,8 @@ this.diagnostics = options.diagnostics;

if (this.mode === 'production') {
if (decl.prop.startsWith('-st-')) {
this.directiveNodes.push(decl);
}
}
switch (decl.prop) {

@@ -305,2 +312,5 @@ case `-st-partial-mixin`:

STGlobal.hooks.transformLastPass(lastPassParams);
for (const node of this.directiveNodes) {
node.remove();
}
}

@@ -307,0 +317,0 @@

@@ -15,3 +15,2 @@ import type * as postcss from 'postcss';

removeComments?: boolean;
removeStylableDirectives?: boolean;
removeUnusedComponents?: boolean;

@@ -39,5 +38,4 @@ classNameOptimizations?: boolean;

): void;
removeStylableDirectives(root: postcss.Root, shouldComment?: boolean): void;
}
export type ModuleResolver = (directoryPath: string, request: string) => string;

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