Socket
Socket
Sign inDemoInstall

gonzales-pe-sl

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gonzales-pe-sl - npm Package Compare versions

Comparing version 3.2.8 to 4.2.3

.eslintrc.yaml

2

.jscs.json

@@ -16,2 +16,3 @@ {

"esnext": true,
"excludeFiles": ["src/syntaxes.js"],
"maximumLineLength": 80,

@@ -61,3 +62,2 @@ "requireBlocksOnNewline": 1,

"checkTypes": true,
"disallowNewlineAfterDescription": true,
"requireParamTypes": true,

@@ -64,0 +64,0 @@ "requireReturnTypes": true

@@ -13,3 +13,4 @@ #!/usr/bin/env node

if (options.help) {
return displayHelp();
displayHelp();
process.exit(0);
}

@@ -24,11 +25,11 @@

function getOptions() {
var parserOptions = {
boolean: ['silent', 'simple'],
alias: {
help: 'h',
syntax: 's',
context: 'c'
}
};
return parseArgs(process.argv.slice(2), parserOptions);
var parserOptions = {
boolean: ['silent', 'simple'],
alias: {
help: 'h',
syntax: 's',
context: 'c'
}
};
return parseArgs(process.argv.slice(2), parserOptions);
}

@@ -41,56 +42,56 @@

function processSTDIN() {
var input = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (data) {
input += data;
});
process.stdin.on('end', function () {
processInputData(input);
});
var input = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', data => {
input += data;
});
process.stdin.on('end', () => {
processInputData(input);
});
}
function processFile(file) {
if (!file) process.exit(0);
if (!options.syntax) options.syntax = path.extname(file).substring(1);
var css = fs.readFileSync(file, 'utf-8').trim();
processInputData(css);
if (!file) process.exit(0);
if (!options.syntax) options.syntax = path.extname(file).substring(1);
var css = fs.readFileSync(file, 'utf-8').trim();
processInputData(css);
}
function processInputData(input) {
try {
var ast = gonzales.parse(input, {
syntax: options.syntax,
context: options.context
});
printTree(ast);
process.exit(0);
} catch (e) {
if (!options.silent) process.stderr.write(e.toString());
process.exit(1);
}
try {
var ast = gonzales.parse(input, {
syntax: options.syntax,
context: options.context
});
printTree(ast);
process.exit(0);
} catch (e) {
if (!options.silent) process.stderr.write(e.toString());
process.exit(1);
}
}
function printTree(ast) {
if (!options.simple) {
var tree = ast.toJson();
process.stdout.write(tree);
} else {
var lastLevel;
if (!options.simple) {
var tree = ast.toJson();
process.stdout.write(tree);
} else {
var lastLevel;
ast.traverse(function(node, i, parent, lastLevel) {
var type = node.type;
var spaces = new Array(lastLevel).join(' |');
if (typeof node.content === 'string') {
var content = JSON.stringify(node.content);
console.log(spaces, '->', type);
console.log(spaces, ' ', content);
} else {
console.log(spaces, '->', type);
}
});
ast.traverse(function(node, i, parent, lastLevel) {
var type = node.type;
var spaces = new Array(lastLevel).join(' |');
if (typeof node.content === 'string') {
var content = JSON.stringify(node.content);
console.log(spaces, '->', type);
console.log(spaces, ' ', content);
} else {
console.log(spaces, '->', type);
}
});
var spaces = new Array(lastLevel).join(' -');
console.log(spaces);
}
var spaces = new Array(lastLevel).join(' -');
console.log(spaces);
}
}

@@ -97,0 +98,0 @@

@@ -8,37 +8,179 @@ # Changelog

:star: — some new thing has been added.
:green_apple: — some bad thing has been fixed.
:green_apple: — some bad thing has been fixed.
---
## 28.09.2017, version 4.2.3
# GONZALES-PE-SL FORK CHANGES
:green_apple: Fixed parsing of empty `url()` in Sass and SCSS.
As of 3.2.6 The sasstools team decided to fork and maintain a separate copy of gonzales-pe named gonzales-pe-sl. Our intention is to still provide fixes etc back into gonzales-pe but at the same time allow sass-lint and anyone else who feels like they want to depend on this fork to continue and progress with any issues that remain unfixed/unmerged in the base repository. We will be looking to support this fork for as long as is necessary.
## 30.08.2017, version 4.2.2
## 27.04.2016, Version 3.2.8
:green_apple: - Fixed a nested child selectors bug for Sass and SCSS format [#8](https://github.com/DanPurdy/gonzales-pe/pull/8)
:green_apple: Fixed parsing of `/deep/` in CSS, LESS, Sass and SCSS.
:green_apple: - Fixed an in issue with functions inside `url()` [#5](https://github.com/DanPurdy/gonzales-pe/pull/5)
## 29.08.2017, version 4.2.1
## 21.04.2016, Version 3.2.7
:green_apple: - Removed postinstall bash specific scripts, to work on the development version you will manually need to run these now but installing from NPM now won't fail for all users not using bash.
:green_apple: Fixed parsing of `pseudo-element` in CSS, LESS, Sass and SCSS.
:green_apple: - Fixed CRLF line endings and line/column numbers for `.sass`, `.scss` syntaxes.
## 29.08.2017, version 4.2.0
:green_apple: - Fixed @extends not reporting correctly in Sass.
:star: Add support for custom property syntax in CSS, Sass and SCSS.
:star: Add support for deep combinator syntax in CSS, LESS, Sass and SCSS.
:star: Add support for alternative descendant `>>` syntax in CSS, LESS, Sass and SCSS.
:star: Add support for `::slotted()` syntax in CSS, LESS, Sass and SCSS.
:green_apple: Fixed parsing of non-lowercase keyframes at-rule in CSS, LESS, Sass and SCSS.
:green_apple: Fixed parsing of multiline selectors within keyframes in Sass.
:green_apple: Fixed parsing of `!important` within maps in Sass and SCSS.
:green_apple: Fixed parsing of `...` following a function in Sass and SCSS.
---
## 23.08.2017, version 4.1.1
## 07.02.2016, Version 3.2.6
:star: Unified codebase style across syntaxes.
:green_apple: Fixed parsing of URLs in Sass and SCSS.
:green_apple: Fixed parsing of placeholders in Sass and SCSS.
:green_apple: Fixed parsing of interpolated values within type selectors in Sass and SCSS.
:green_apple: Fixed parsing of spacing within pseudo class arguments in all syntaxes.
:green_apple: Fixed parsing of parent selectors within parentheses in Sass and SCSS.
:star: Abstracted attribute tests for CSS, LESS, Sass and SCSS.
:green_apple: Fixed parsing of pseudo classes within keyframes in Sass and SCSS.
:green_apple: Fixed parsing of dimensions in LESS.
## 20.11.2016, version 4.0.3
:green_apple: Fixed parsing of interpolations inside URI nodes in SCSS and Sass.
## 18.11.2016, version 4.0.2
:green_apple: Fixed parsing of trailing newlines.
## 18.11.2016, version 4.0.1
:japanese_ogre: Removed `postinstall` script.
## 17.11.2016, version 4.0.0
:japanese_ogre: Dropped support for Node < 4.
:japanese_ogre: Brought back `postinstall` script that should allow installing
from GitHub.
:japanese_ogre: Made multiline comments in Sass consistent with other syntaxes
by removing closing `*/` from node's content.
:japanese_ogre: Implemented new node type, `universalSelector`, which represents
`*`. See [docs](https://github.com/tonyganch/gonzales-pe/blob/dev/docs/node-types.md#universalselector)
for more details.
:green_apple: Fixed parsing of comments in Sass.
:green_apple: Fixed parsing of keyframes inside includes in Sass.
:green_apple: Fixed parsing of flags in arguments in Sass and SCSS.
:green_apple: Fixed parsing of multiple declarations within arguments in SCSS
and Sass.
:green_apple: Improved parsing of interpolations in SCSS and Sass.
:green_apple: Adjust parsing priority of declarations & atrule in Less.
## 22.10.2016, version 3.4.7
:green_apple: Included forgotten test for #226.
:green_apple: Fixed issue when `!important` was not parsed as function argument.
## 22.10.2016, version 3.4.6
:green_apple: Changed parsing of `ident` nodes which fixed issue with asterisks
being parsed as idents instead of operators.
:green_apple: Fixed capitalisation in Changelog.
## 20.10.2016, version 3.4.5
:green_apple: Change parser to strip DOS newlines from comments.
:star: Add links to README.md.
## 12.08.2016, version 3.4.4
:green_apple: Fixed parsing of numbers following interpolation in class
selectors in Sass and SCSS.
## 08.08.2016, version 3.4.3
:green_apple: Fixed parsing of unicode ranges.
## 04.08.2016, version 3.4.2
:green_apple: Disable Google Closure Compiler due to some errors in parsing.
## 27.07.2016, version 3.4.1
:star: Added publich script.
:green_apple: Fixed post-refactor error in Node#last method.
## 27.07.2016, version 3.4.0
:star: Added `unicode-range` and `urange` node types in CSS, Less, Sass and SCSS.
:green_apple: Fixed parsing of trailing interpolation in compound selector in Sass and SCSS.
:green_apple: Fix parsing of hyphens after interpolation with parentSelectors in Sass and SCSS.
:green_apple: Added ESLint and moved linters to a separate script.
:green_apple: Fixed incorrect dimension wrap of unicode-ranges in CSS, Sass and SCSS.
:green_apple: Fixed parsing of hyphens in interpolated idents in Sass and SCSS.
:green_apple: Added compilation of JS using Google Closure.
## 01.07.2016, version 3.3.6
:green_apple: Fixed parsing of nth selector without numbers before `n`.
## 21.06.2016, version 3.3.5
:green_apple: Fixed issue with content at-rule and keyframes in Sass and SCSS.
:green_apple: Fixed namespace attribute selector in CSS, Sass and SCSS.
:green_apple: Fixed issue with modulo operator in values in Sass.
:green_apple: Fixed usage of @content with keyframes in Sass and SCSS.
:green_apple: Fixed namespace attribute selector issue in CSS, Sass and SCSS.
:green_apple: Fixed parsing of interpolations in pseudo-classes in Sass and SCSS.
:green_apple: Fixed interpolated percentage keyframe selector issue in Sass and SCSS.
:green_apple: Updated Travis config to not include environment variables.
## 18.05.2016, version 3.3.4
:green_apple: Fixed mistake from `@3.3.2` version when parent selector was
"correctly" parsed as property instead of value.
## 18.05.2016, version 3.3.3
:green_apple: Fixed prepublish script to build lib.
## 18.05.2016, version 3.3.2
:star: Added AppVeyor badge.
:green_apple: Fixed build file to glue multiple syntaxes into one file.
:green_apple: Fixed parsing of functions inside urls in Sass.
:green_apple: Fixed parsing of mulitple keyframe selectors in CSS, Sass and SCSS.
:green_apple: Fixed parsing of parent selector as property in Sass and SCSS.
:green_apple: Fixed parsing of parent selector inside interpolations in Sass and SCSS.
## 29.04.2016, version 3.3.1
:star: Added config for AppVeyor to run automated tests on Windows.
:green_apple: Fix installation for Windows.
## 28.04.2016, version 3.3.0
:star: Added browser support. `build.sh` now build a script that can be used in
browsers.
## 28.04.2016, version 3.2.7
:green_apple: Fixed typos and example in documentation.
:green_apple: Fixed parsing of functions inside urls in SCSS.
:green_apple: Fixed parsing of selectors starting with combinators in Sass, SCSS
and Less.
:green_apple: Fixed incorrect CRLF line numbers.
:green_apple: Fixed parsing of extends that sometimes were incorrectly parsed
as atrules.
## 07.02.2016, version 3.2.6
:green_apple: Fixed the issue with installation of the package with npm@3.
## 07.02.2016, Version 3.2.5
## 07.02.2016, version 3.2.5
:green_apple: Fixed parsing of nested multiline selectors group.
## 07.02.2016, Version 3.2.4
## 07.02.2016, version 3.2.4
:star: Added support for `!global` in Sass.
## 07.02.2016, Version 3.2.3
## 07.02.2016, version 3.2.3

@@ -54,7 +196,7 @@ :star: Modified `npm test` to remove `.DS_Store` files before running tests.

## 17.01.2016, Version 3.2.2
## 17.01.2016, version 3.2.2
:green_apple: Made `ParsingError#message` property writeable.
## 19.10.2015, Version 3.2.1
## 19.10.2015, version 3.2.1

@@ -67,3 +209,3 @@ #### Parsing rules

## 19.10.2015, Version 3.2.0
## 19.10.2015, version 3.2.0

@@ -79,3 +221,3 @@ #### Node types

## 19.10.2015, Version 3.1.1
## 19.10.2015, version 3.1.1

@@ -87,3 +229,3 @@ #### Parsing rules

## 18.10.2015, Version 3.1.0
## 18.10.2015, version 3.1.0

@@ -103,3 +245,3 @@ #### CLI

## 18.10.2015, Version 3.0.3
## 18.10.2015, version 3.0.3

@@ -110,3 +252,3 @@ #### Parsing rules

## 18.10.2015, Version 3.0.2
## 18.10.2015, version 3.0.2

@@ -118,3 +260,3 @@ #### Parsing rules

## 18.10.2015, Version 3.0.1
## 18.10.2015, version 3.0.1

@@ -125,3 +267,3 @@ #### Parsing rules

## 18.10.2015, Version 3.0.0
## 18.10.2015, version 3.0.0

@@ -157,3 +299,3 @@ #### CLI

## 05.10.2015, Version 3.0.0-beta
## 05.10.2015, version 3.0.0-beta

@@ -240,3 +382,3 @@ #### CLI

## 29.12.2013, Version 2.0.2
## 29.12.2013, version 2.0.2

@@ -246,7 +388,7 @@ - Sass includes can have both arguments list and content block,

## 18.11.2013, Version 2.0.1
## 18.11.2013, version 2.0.1
- Bring back lost whitespaces and comments
## 11.11.2013, Version 2.0.0
## 11.11.2013, version 2.0.0

@@ -283,3 +425,3 @@ - Support preprocessors: Sass (both SCSS and indented syntax), LESS.

## 11.02.2013, Version 1.0.7
## 11.02.2013, version 1.0.7

@@ -289,3 +431,3 @@ - Identifiers like `_0` are identifiers now.

## 25.11.2012, Version 1.0.6
## 25.11.2012, version 1.0.6

@@ -296,24 +438,24 @@ - Typo fix (global variable leak): https://github.com/css/csso/pull/110

## 28.10.2012, Version 1.0.5
## 28.10.2012, version 1.0.5
- Better error line numbering: https://github.com/css/gonzales/issues/2
## 11.10.2012, Version 1.0.4
## 11.10.2012, version 1.0.4
- CSSO issue (@page inside @media error): https://github.com/css/csso/issues/90
## 10.10.2012, Version 1.0.3
## 10.10.2012, version 1.0.3
- Both .t-1 and .t-01 should be idents: https://github.com/css/gonzales/issues/1
## 08.10.2012, Version 1.0.2
## 08.10.2012, version 1.0.2
- CSSO issue (filter + important breaks csso v1.3.1): https://github.com/css/csso/issues/87
## 08.10.2012, Version 1.0.1
## 08.10.2012, version 1.0.1
- CSSO issue ("filter" IE property breaks CSSO v1.3.0): https://github.com/css/csso/issues/86
## 03.10.2012, Version 1.0.0
## 03.10.2012, version 1.0.0
- First revision.
{
"name": "gonzales-pe-sl",
"description": "Temporary gonzales-pe fork for sass-lint",
"version": "3.2.8",
"version": "4.2.3",
"homepage": "https://github.com/DanPurdy/gonzales-pe",
"bugs": "https://github.com/DanPurdy/gonzales-pe/issues",
"bugs": "http://github.com/tonyganch/gonzales-pe/issues",
"license": "MIT",
"author": {
"name": "Dan Purdy",
"email": "dan@danpurdy.co.uk",
"url": "danpurdy.co.uk"
"email": "dan@dpurdy.me",
"url": "dan@dpurdy.me"
},

@@ -19,9 +19,11 @@ "main": "./lib/gonzales",

"scripts": {
"autofix-tests": "./scripts/build.sh && ./scripts/autofix-tests.sh",
"build": "./scripts/build.sh",
"init": "./scripts/init.sh",
"log": "./scripts/log.sh",
"prepublish": "./scripts/prepublish.sh",
"postpublish": "./scripts/postpublish.sh",
"test": "./scripts/build.sh && ./scripts/test.sh"
"autofix-tests": "bash ./scripts/build.sh && bash ./scripts/autofix-tests.sh",
"build": "bash ./scripts/build.sh",
"init": "bash ./scripts/init.sh",
"lint": "bash ./scripts/lint.sh",
"log": "bash ./scripts/log.sh",
"prepublish": "bash ./scripts/prepublish.sh",
"postpublish": "bash ./scripts/postpublish.sh",
"test": "bash ./scripts/test.sh",
"watch": "bash ./scripts/watch.sh"
},

@@ -35,7 +37,14 @@ "bin": {

"devDependencies": {
"babel": "^5.5.3",
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.18.0",
"coffee-script": "~1.7.1",
"eslint": "^3.0.0",
"jscs": "2.1.0",
"jshint": "2.8.0",
"mocha": "2.2.x"
"json-loader": "^0.5.3",
"mocha": "2.2.x",
"webpack": "^1.12.2",
"webpack-closure-compiler": "^2.0.2"
},

@@ -42,0 +51,0 @@ "engines": {

@@ -5,5 +5,8 @@ # Gonzales PE @dev

(https://travis-ci.org/tonyganch/gonzales-pe)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/m29jphtrqt398v2o/branch/dev?svg=true)]
(https://ci.appveyor.com/project/tonyganch/gonzales-pe/branch/dev)
Gonzales PE is a CSS parser which plays nicely with preprocessors.
Currently those are supported: SCSS, Sass, LESS.
Currently those are supported: SCSS, Sass, LESS.
Try out Gonzales PE online: [Gonzales PE Playground](http://tonyganch.com/gonzales-pe/).

@@ -47,2 +50,4 @@ ## Install

The different type of tree nodes can be found in [docs/node-types.md](https://github.com/tonyganch/gonzales-pe/blob/dev/docs/node-types.md).
In examples below I assume that `gonzales` is a parser module and `parseTree`

@@ -285,3 +290,3 @@ is some parsed css:

Gets the first child node. If `type` parameter is passed, gets the fisrt child
Gets the first child node. If `type` parameter is passed, gets the first child
node of a given type. If no node has been found, returns `null`.

@@ -288,0 +293,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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