Comparing version 0.54.7 to 0.54.8
@@ -58,3 +58,3 @@ | ||
* .define('url', stylus.url({ paths: [__dirname + '/public'] })) | ||
* .render(function(err, css){ ... }) | ||
* .render(function(err, css) { ... }) | ||
* | ||
@@ -78,3 +78,3 @@ * @param {Object} options | ||
*/ | ||
function fn(url, enc){ | ||
function fn(url, enc) { | ||
// Compile the url | ||
@@ -85,3 +85,3 @@ var compiler = new Compiler(url) | ||
compiler.isURL = true; | ||
url = url.nodes.map(function(node){ | ||
url = url.nodes.map(function(node) { | ||
return compiler.visit(node); | ||
@@ -101,6 +101,6 @@ }).join(''); | ||
// Not supported | ||
if (!mime) return literal; | ||
if(!mime) return literal; | ||
// Absolute | ||
if (url.protocol) return literal; | ||
if(url.protocol) return literal; | ||
@@ -111,3 +111,3 @@ // Lookup | ||
// Failed to lookup | ||
if (!found) { | ||
if(!found) { | ||
events.emit( | ||
@@ -122,10 +122,10 @@ 'file not found' | ||
// Read data | ||
buf = fs.readFileSync(found); | ||
var str = fs.readFileSync(found, 'utf8'); | ||
// Too large | ||
if (false !== sizeLimit && buf.length > sizeLimit) return literal; | ||
if(false !== sizeLimit && str.length > sizeLimit) return literal; | ||
if (enc && 'utf8' == enc.first.val.toLowerCase()) { | ||
if(enc && 'utf8' == enc.first.val.toLowerCase()) { | ||
encoding = encodingTypes.UTF8; | ||
result = buf.toString('utf8').replace(/\s+/g, ' ') | ||
result = str.replace(/\s+/g, ' ') | ||
.replace(/[{}\|\\\^~\[\]`"<>#%]/g, function(match) { | ||
@@ -135,3 +135,3 @@ return '%' + match[0].charCodeAt(0).toString(16).toUpperCase(); | ||
} else { | ||
result = buf.toString(encoding) + hash; | ||
result = Buffer.from(str.replace(/\r\n?/g, '\n')).toString(encoding) + hash; | ||
} | ||
@@ -138,0 +138,0 @@ |
@@ -672,3 +672,3 @@ | ||
var captures; | ||
if (captures = /^-*[@_a-zA-Z$][-\w\d$]*/.exec(this.str)) { | ||
if (captures = /^-*([_a-zA-Z$]|@apply)[-\w\d$]*/.exec(this.str)) { | ||
this.skip(captures); | ||
@@ -675,0 +675,0 @@ return new Token('ident', new nodes.Ident(captures[0])); |
@@ -8,2 +8,6 @@ | ||
exports.lineno = null; | ||
exports.column = null; | ||
exports.filename = null; | ||
/** | ||
@@ -10,0 +14,0 @@ * Constructors |
@@ -41,3 +41,3 @@ | ||
options.use = Array.isArray(options.use) ? options.use : [options.use]; | ||
options.imports = [join(__dirname, 'functions')].concat(options.imports || []); | ||
options.imports = [join(__dirname, 'functions/index.styl')].concat(options.imports || []); | ||
options.paths = options.paths || []; | ||
@@ -44,0 +44,0 @@ options.filename = options.filename || 'stylus'; |
@@ -113,3 +113,3 @@ | ||
DepsResolver.prototype.visitImport = function(node) { | ||
var path = node.path.first.val | ||
var path = !node.path.first.val.isNull && node.path.first.val || node.path.first.name | ||
, literal, found, oldPath; | ||
@@ -116,0 +116,0 @@ |
{ | ||
"name": "stylus", | ||
"description": "Robust, expressive, and feature-rich CSS superset", | ||
"version": "0.54.7", | ||
"version": "0.54.8", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -34,7 +34,7 @@ "keywords": [ | ||
"debug": "~3.1.0", | ||
"glob": "^7.1.3", | ||
"mkdirp": "~0.5.x", | ||
"glob": "^7.1.6", | ||
"mkdirp": "~1.0.4", | ||
"safer-buffer": "^2.1.2", | ||
"sax": "~1.2.4", | ||
"semver": "^6.0.0", | ||
"semver": "^6.3.0", | ||
"source-map": "^0.7.3" | ||
@@ -44,3 +44,3 @@ }, | ||
"jscoverage": "~0.6.0", | ||
"mocha": "^5.2.0", | ||
"mocha": "^8.0.1", | ||
"should": "^13.2.3" | ||
@@ -47,0 +47,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13932
417388
141
+ Addedmkdirp@1.0.4(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
Updatedglob@^7.1.6
Updatedmkdirp@~1.0.4
Updatedsemver@^6.3.0