Socket
Socket
Sign inDemoInstall

sass-graph

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-graph - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

test/fixtures/components/_q.scss/_s.scss

5

CHANGELOG.md

@@ -11,2 +11,7 @@ # Change Log

## [2.1.1]
### Fixed
- Don't add directory `@import`s to graph - [@niksy](https://github.com/niksy)
## [2.1.0]

@@ -13,0 +18,0 @@ ### Features

2

package.json
{
"name": "sass-graph",
"version": "2.1.0",
"version": "2.1.1",
"description": "Parse sass files and extract a graph of imports",

@@ -5,0 +5,0 @@ "license": "MIT",

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

scssPath = path.normalize(loadPaths[i] + '/' + sassPathName + '.' + extensions[j]);
if (fs.existsSync(scssPath)) {
if (fs.existsSync(scssPath) && fs.lstatSync(scssPath).isFile()) {
return scssPath;

@@ -29,3 +29,3 @@ }

partialPath = path.join(path.dirname(scssPath), '_' + path.basename(scssPath));
if (fs.existsSync(partialPath)) {
if (fs.existsSync(partialPath) && fs.lstatSync(partialPath).isFile()) {
return partialPath;

@@ -32,0 +32,0 @@ }

@@ -22,2 +22,4 @@

'_p.scss': path.join(fixtures, '_o.scss/_p.scss'),
'r.scss': path.join(fixtures, 'r.scss'),
'_s.scss': path.join(fixtures, 'components/_q.scss/_s.scss'),
'_compass.scss': path.join(fixtures, 'components/_compass.scss')

@@ -58,2 +60,6 @@ }

it('should ignore folder "_q.scss" which has allowed extensions (but not it’s children), referenced from r.scss', function() {
assert.deepEqual([files['_compass.scss'], files['_s.scss']], graph.index[files['r.scss']].imports);
});
it('should traverse ancestors of _c.scss', function() {

@@ -60,0 +66,0 @@ ancestors = [];

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