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

postcss-merge-rules

Package Overview
Dependencies
Maintainers
5
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-merge-rules - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

29

dist/lib/ensureCompatibility.js

@@ -76,2 +76,17 @@ 'use strict';

const isSupportedCache = {};
// Move to util in future
function isSupportedCached(feature, browsers) {
const key = JSON.stringify({ feature, browsers });
let result = isSupportedCache[key];
if (!result) {
result = (0, _caniuseApi.isSupported)(feature, browsers);
isSupportedCache[key] = result;
}
return result;
}
function ensureCompatibility(selectors, browsers, compatibilityCache) {

@@ -96,3 +111,3 @@ // Should not merge mixins

if (entry && compatible) {
compatible = (0, _caniuseApi.isSupported)(entry, browsers);
compatible = isSupportedCached(entry, browsers);
}

@@ -102,6 +117,6 @@ }

if (~value.indexOf('~')) {
compatible = (0, _caniuseApi.isSupported)(cssSel3, browsers);
compatible = isSupportedCached(cssSel3, browsers);
}
if (~value.indexOf('>') || ~value.indexOf('+')) {
compatible = (0, _caniuseApi.isSupported)(cssSel2, browsers);
compatible = isSupportedCached(cssSel2, browsers);
}

@@ -112,3 +127,3 @@ }

if (!node.operator) {
compatible = (0, _caniuseApi.isSupported)(cssSel2, browsers);
compatible = isSupportedCached(cssSel2, browsers);
}

@@ -119,7 +134,7 @@

if (~['=', '~=', '|='].indexOf(node.operator)) {
compatible = (0, _caniuseApi.isSupported)(cssSel2, browsers);
compatible = isSupportedCached(cssSel2, browsers);
}
// [foo^="bar"], [foo$="bar"], [foo*="bar"]
if (~['^=', '$=', '*='].indexOf(node.operator)) {
compatible = (0, _caniuseApi.isSupported)(cssSel3, browsers);
compatible = isSupportedCached(cssSel3, browsers);
}

@@ -130,3 +145,3 @@ }

if (node.insensitive) {
compatible = (0, _caniuseApi.isSupported)('css-case-insensitive', browsers);
compatible = isSupportedCached('css-case-insensitive', browsers);
}

@@ -133,0 +148,0 @@ }

{
"name": "postcss-merge-rules",
"version": "4.0.2",
"version": "4.0.3",
"description": "Merge CSS rules with PostCSS.",

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

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