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

purgecss-whitelister

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

purgecss-whitelister - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

16

index.js

@@ -1,2 +0,7 @@

const { parse } = require('scss-parser') // https://github.com/salesforce-ux/scss-parser
/*
Forked from - https://github.com/salesforce-ux/scss-parser
Forked because there's no active maintenance and npm audit errors were killing me.
*/
const { parse } = require('scss-parser')
const parse2 = require('gonzales-pe').parse

@@ -9,4 +14,11 @@ const { readFileSync } = require('fs')

const shouldKeep2 = ['id', 'class', 'attribute', 'typeSelector']
const exts = ['css', 'sass', 'scss', 'less']
/*
The pcss file extension is a PostCSS extension.
They currently have no official documentation around it so
using it with this tool is completely at your own risk.
I mean, villages won't burn if you use it but your code might error out. YMMV.
*/
const exts = ['css', 'sass', 'scss', 'less', 'pcss']
function makeWhitelist(filenames) {

@@ -13,0 +25,0 @@ filenames = sanitizeArgs(filenames)

2

package.json
{
"name": "purgecss-whitelister",
"version": "2.2.0",
"version": "2.3.0",
"description": "A utility for creating whitelists of CSS selectors for use with Purgecss.",

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

@@ -37,4 +37,6 @@ ```

**NOTE:** `purgecss-whitelister` will internally ignore any files that don't have the following extensions: `css`, `sass`, `scss`, `less`.
**NOTE:** `purgecss-whitelister` will internally ignore any files that don't have the following extensions: `css`, `sass`, `scss`, `less`, or `pcss`.
**NOTE:** Use the `pcss` extension with caution. It may or may not work. `pcss` is a PostCSS file extension but has no official documentation. It's been added to this tool for convenience but YMMV. If anyone has info on the `pcss` extension, I'm all ears.
```javascript

@@ -41,0 +43,0 @@ const { resolve } = require('path')

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