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

postcss-styl

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-styl - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

24

lib/parser/index.js

@@ -776,6 +776,13 @@ "use strict"

} else {
const betweenLength = (
parsedNameAndCondition.raw.stylusBetween ||
parsedNameAndCondition.raw.between
).length
atRuleSource = {
start: this.sourceCode.getLoc(startIndex),
input: this.input,
end: this.sourceCode.getLoc(parsedNameAndCondition.endIndex),
end: this.sourceCode.getLoc(
parsedNameAndCondition.endIndex - betweenLength
),
rawEnd: this.sourceCode.getLoc(parsedNameAndCondition.endIndex),
}

@@ -1518,5 +1525,18 @@ atRuleRaws = {

if (last) {
let prevNode = last
let endIndex = this.sourceCode.getIndex(
prevNode.source.rawEnd || prevNode.source.end
)
while (prevNode.last) {
prevNode = prevNode.last
if (prevNode.source.rawEnd) {
endIndex = Math.max(
endIndex,
this.sourceCode.getIndex(prevNode.source.rawEnd)
)
}
}
parsedRawBefore = parseRawBefore(
this.sourceCode,
this.sourceCode.getIndex(last.source.end) + 1,
endIndex + 1,
end && this.sourceCode.getIndex(end)

@@ -1523,0 +1543,0 @@ )

13

lib/parser/parse-value.js

@@ -36,7 +36,4 @@ "use strict"

// end
tokens.push(...spaces)
if (token.type === "linebreak") {
// between.push(token)
endIndex = token.range[0] - 1
} else {
if (token.type === "inline-comment") {
tokens.push(...spaces)
tokens.push(token)

@@ -57,5 +54,2 @@ endIndex = token.range[1] - 1

// end
endIndex =
(spaces.length ? spaces[0].range[0] : token.range[0]) -
1
break

@@ -66,3 +60,3 @@ }

if (isSkipToken(token)) {
if (token.type === "whitespace") {
spaces.push(token)

@@ -79,2 +73,3 @@ } else {

}
return {

@@ -81,0 +76,0 @@ tokens,

{
"name": "postcss-styl",
"version": "0.0.4",
"version": "0.0.5",
"description": "PostCSS parser plugin for converting Stylus syntax to PostCSS AST.",

@@ -9,3 +9,3 @@ "main": "lib/index.js",

"pretest": "npm run lint",
"test:base": "mocha \"tests/**/*.js\" --reporter dot",
"test:base": "cross-env DEBUG=postcss-styl* mocha \"tests/**/*.js\" --reporter dot",
"test:update-fixtures": "cross-env UPDATE_FIXTURES=true npm run test:base",

@@ -12,0 +12,0 @@ "test": "npm run test:nyc",

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