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

fela-monolithic

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-monolithic - npm Package Compare versions

Comparing version 5.0.8 to 5.0.9

15

es/index.js

@@ -5,3 +5,3 @@

import { isObject, isMediaQuery, isNestedSelector, isUndefinedValue, objectReduce, normalizeNestedProperty, processStyleWithPlugins, generateMonolithicClassName, generateCombinedMediaQuery, generateCSSSelector, generateCSSRule, RULE_TYPE } from 'fela-utils';
import { isObject, isSupport, isMediaQuery, isNestedSelector, isUndefinedValue, objectReduce, normalizeNestedProperty, processStyleWithPlugins, generateMonolithicClassName, generateCombinedMediaQuery, generateCSSSelector, generateCSSRule, RULE_TYPE } from 'fela-utils';

@@ -13,5 +13,9 @@ function useMonolithicRenderer(renderer) {

// monolithic output can not be rehydrated
renderer.enableRehydration = false;
renderer._renderStyleToCache = function (className, style) {
var pseudo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
var media = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
var support = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';

@@ -21,7 +25,10 @@ var ruleSet = objectReduce(style, function (ruleset, value, property) {

if (isNestedSelector(property)) {
renderer._renderStyleToCache(className, value, pseudo + normalizeNestedProperty(property), media);
renderer._renderStyleToCache(className, value, pseudo + normalizeNestedProperty(property), media, support);
} else if (isMediaQuery(property)) {
var combinedMediaQuery = generateCombinedMediaQuery(media, property.slice(6).trim());
renderer._renderStyleToCache(className, value, pseudo, combinedMediaQuery);
renderer._renderStyleToCache(className, value, pseudo, combinedMediaQuery, support);
} else if (isSupport(property)) {
var combinedSupport = generateCombinedMediaQuery(support, property.slice(9).trim());
renderer._renderStyleToCache(className, value, pseudo, media, combinedSupport);
} else {

@@ -49,3 +56,3 @@ // TODO: warning

var declarationReference = selector + media;
var declarationReference = selector + media + support;
renderer.cache[declarationReference] = change;

@@ -52,0 +59,0 @@ renderer._emitChange(change);

@@ -22,5 +22,9 @@ 'use strict';

// monolithic output can not be rehydrated
renderer.enableRehydration = false;
renderer._renderStyleToCache = function (className, style) {
var pseudo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
var media = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
var support = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';

@@ -30,7 +34,10 @@ var ruleSet = (0, _felaUtils.objectReduce)(style, function (ruleset, value, property) {

if ((0, _felaUtils.isNestedSelector)(property)) {
renderer._renderStyleToCache(className, value, pseudo + (0, _felaUtils.normalizeNestedProperty)(property), media);
renderer._renderStyleToCache(className, value, pseudo + (0, _felaUtils.normalizeNestedProperty)(property), media, support);
} else if ((0, _felaUtils.isMediaQuery)(property)) {
var combinedMediaQuery = (0, _felaUtils.generateCombinedMediaQuery)(media, property.slice(6).trim());
renderer._renderStyleToCache(className, value, pseudo, combinedMediaQuery);
renderer._renderStyleToCache(className, value, pseudo, combinedMediaQuery, support);
} else if ((0, _felaUtils.isSupport)(property)) {
var combinedSupport = (0, _felaUtils.generateCombinedMediaQuery)(support, property.slice(9).trim());
renderer._renderStyleToCache(className, value, pseudo, media, combinedSupport);
} else {

@@ -58,3 +65,3 @@ // TODO: warning

var declarationReference = selector + media;
var declarationReference = selector + media + support;
renderer.cache[declarationReference] = change;

@@ -61,0 +68,0 @@ renderer._emitChange(change);

{
"name": "fela-monolithic",
"version": "5.0.8",
"version": "5.0.9",
"description": "Fela enhancer for having monolithic classnames",

@@ -27,8 +27,8 @@ "main": "lib/index.js",

"css-in-js-utils": "^2.0.0",
"fela-utils": "^7.0.0"
"fela-utils": "^7.0.1"
},
"devDependencies": {
"fela": "^6.0.0",
"fela-tools": "^5.0.8"
"fela": "^6.0.1",
"fela-tools": "^5.0.9"
}
}
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