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

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.2.4 to 3.0.0

27

CHANGELOG.md

@@ -5,2 +5,4 @@ # Change Log

## [next]
### BREAKING CHANGES
### Features

@@ -12,2 +14,27 @@

### Dependencies
## [3.0.0]
### BREAKING CHANGES
- Drop support Node < 6 (@realityking, #88, @xzyfer 3b2ec74)
- Don't add .css imports to the graph by default (@xzyfer, #91)
### Features
- Add option to exclude files based on regular expression (@Iambecomeroot, #86)
### Fixes
- Fix broken bounds check in CLI (@xzyfer, 5dd065e)
### Dependencies
- yargs@^10.0.3 (@realityking, #88)
- chai@^4.1.2 (@realityking, #88)
- coveralls@^3.0.0 (@realityking, #88)
- mocha@^4.0.1 (@realityking, #88)
- nyc@^11.2.1 (@realityking, #88)
- scss-tokenizer@^0.3.0 (@xzyfer, 3b2ec74)
## [2.2.4]

@@ -14,0 +41,0 @@ ### Dependencies

17

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

@@ -23,12 +23,15 @@ "license": "MIT",

"lodash": "^4.0.0",
"scss-tokenizer": "^0.2.3",
"yargs": "^7.0.0"
"scss-tokenizer": "^0.3.0",
"yargs": "^10.0.3"
},
"devDependencies": {
"assert": "^1.3.0",
"chai": "^3.5.0",
"coveralls": "^2.13.0",
"mocha": "^3.2.0",
"nyc": "^10.2.0"
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"mocha": "^4.0.1",
"nyc": "^11.2.1"
},
"engines": {
"node": ">= 4"
},
"files": [

@@ -35,0 +38,0 @@ "bin",

@@ -85,2 +85,9 @@ # Sass Graph

#### exclude
Type: `RegExp`
Default: `undefined`
Exclude files matching regular expression.
## Example

@@ -87,0 +94,0 @@

@@ -45,2 +45,3 @@ 'use strict';

this.extensions = options.extensions || [];
this.exclude = options.exclude instanceof RegExp ? options.exclude : null;
this.index = {};

@@ -62,2 +63,4 @@ this.follow = options.follow || false;

Graph.prototype.addFile = function(filepath, parent) {
if (this.exclude !== null && this.exclude.test(filepath)) return;
var entry = this.index[filepath] = this.index[filepath] || {

@@ -80,2 +83,5 @@ imports: [],

// check exclcude regex
if (this.exclude !== null && this.exclude.test(resolved)) continue;
// recurse into dependencies if not already enumerated

@@ -98,3 +104,6 @@ if (!_.includes(entry.imports, resolved)) {

entry.importedBy.push(resolvedParent);
// check exclcude regex
if (!(this.exclude !== null && this.exclude.test(resolvedParent))) {
entry.importedBy.push(resolvedParent);
}
}

@@ -139,5 +148,5 @@ };

function processOptions(options) {
return _.assign({
return Object.assign({
loadPaths: [process.cwd()],
extensions: ['scss', 'css', 'sass'],
extensions: ['scss', 'sass'],
}, options);

@@ -144,0 +153,0 @@ }

Sorry, the diff of this file is not supported yet

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