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

@mapbox/postcss-html-filter

Package Overview
Dependencies
Maintainers
28
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/postcss-html-filter - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

4

CHANGELOG.md
# Changelog
## 3.0.0
- update dependencies, eslint rules, and travis config.
## 2.0.0

@@ -4,0 +8,0 @@

30

index.js

@@ -10,3 +10,3 @@ 'use strict';

const plugin = postcss.plugin('postcss-html-filter', (options) => {
const htmlFilterPlugin = (options) => {
const query = cheerio.load(options.html);

@@ -60,15 +60,21 @@

return (root, result) => {
root.walkRules(transformRule);
return {
postcssPlugin: 'postcss-html-filter',
Once: (root) => {
root.walkRules(transformRule);
return root;
}
}
};
// Discard any at-rules we've emptied of rules.
postcssDiscardEmpty()(root, result);
const combinedPlugin = (options) => {
return postcss([
htmlFilterPlugin(options),
postcssDiscardEmpty, // Discard any at-rules we've emptied of rules.
postcssDiscardUnused // Discard unused at-rules, e.g. counter-styles, keyframes, font-faces.
])
}
// Discard unused at-rules, e.g. counter-styles, keyframes, font-faces.
postcssDiscardUnused()(root, result);
combinedPlugin.postcss = true
return root;
};
});
module.exports = plugin;
module.exports = combinedPlugin;
{
"name": "@mapbox/postcss-html-filter",
"version": "2.0.0",
"version": "3.0.0",
"description": "Filter CSS through HTML, removing selectors that do not apply to the HTML",

@@ -33,18 +33,17 @@ "main": "index.js",

"cheerio": "^1.0.0-rc.3",
"lodash": "^4.17.15",
"postcss-discard-empty": "^4.0.1",
"postcss-discard-unused": "^4.0.1",
"postcss-selector-parser": "^6.0.2"
"lodash": "^4.17.20",
"postcss-discard-empty": "^6",
"postcss-discard-unused": "^6",
"postcss-selector-parser": "^6.0.4"
},
"devDependencies": {
"eslint": "^7.2.0",
"eslint": "^8",
"eslint-plugin-node": "^11.1.0",
"husky": "^4.2.5",
"jest": "^26.0.1",
"lint-staged": "^10.2.10",
"postcss": "^7.0.32",
"prettier": "^2.0.5"
"husky": "^8",
"jest": "^26.6.3",
"lint-staged": "^11",
"prettier": "^2.1.2"
},
"peerDependencies": {
"postcss": ">=5.0.0"
"postcss": "^8"
},

@@ -51,0 +50,0 @@ "prettier": {

# @mapbox/postcss-html-filter
[![Build Status](https://travis-ci.org/mapbox/postcss-html-filter.svg?branch=main)](https://travis-ci.org/mapbox/postcss-html-filter)
[![Build Status](https://travis-ci.com/mapbox/postcss-html-filter.svg?branch=main)](https://travis-ci.com/mapbox/postcss-html-filter)

@@ -5,0 +5,0 @@ Filter CSS through HTML, removing selectors that do not apply to that HTML.

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