Socket
Socket
Sign inDemoInstall

stylus

Package Overview
Dependencies
Maintainers
4
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus - npm Package Compare versions

Comparing version 0.54.7 to 0.54.8

22

lib/functions/url.js

@@ -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 @@ },

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