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

postcss-nested

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-nested - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

3

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 4.1.2
* Improve error messsage on broken selector
## 4.1.1

@@ -5,0 +8,0 @@ * Add `&(:hover)` support (by Ben Delarre).

16

index.js
var postcss = require('postcss')
var parser = require('postcss-selector-parser')
function parse (str) {
function parse (str, rule) {
var nodes

@@ -9,3 +9,11 @@ var saver = parser(function (parsed) {

})
saver.processSync(str)
try {
saver.processSync(str)
} catch (e) {
if (str.indexOf(':') !== -1) {
throw rule ? rule.error('Missed semicolon') : e
} else {
throw rule ? rule.error(e.message) : e
}
}
return nodes.at(0)

@@ -37,6 +45,6 @@ }

parent.selectors.forEach(function (i) {
var parentNode = parse(i)
var parentNode = parse(i, parent)
child.selectors.forEach(function (j) {
var node = parse(j)
var node = parse(j, child)
var replaced = replace(node, parentNode)

@@ -43,0 +51,0 @@ if (!replaced) {

{
"name": "postcss-nested",
"version": "4.1.1",
"version": "4.1.2",
"description": "PostCSS plugin to unwrap nested rules like how Sass does it",

@@ -16,5 +16,5 @@ "keywords": [

"dependencies": {
"postcss": "^7.0.6",
"postcss-selector-parser": "^5.0.0-rc.4"
"postcss": "^7.0.14",
"postcss-selector-parser": "^5.0.0"
}
}
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