New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

assetstream

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assetstream - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

transform/compileLessQuickFix.js

5

package.json
{
"name": "assetstream",
"version": "0.1.5",
"version": "0.1.6",
"description": "Stream and transform your browser assets.",

@@ -17,4 +17,5 @@ "repository": {

"handlebars": "1.x",
"common": "0.2.x"
"common": "0.2.x",
"mkdirp": "0.3.x"
}
}

29

transform/compileLess.js

@@ -88,3 +88,3 @@

function errorCSS(error, ast) {
function errorMessage(error, ast) {
var filename = ast.filename;

@@ -103,2 +103,11 @@ if (error.line) {

return {
filename: filename,
line: error.line,
column: error.column,
message: filename + ': ' + message
};
}
function errorCSS(message) {
var css =

@@ -108,3 +117,3 @@ 'body:before {\n' +

'\tz-index: 100000;\n' +
'\tcontent: ' + JSON.stringify(filename + ': ' + message) + ';\n' +
'\tcontent: ' + JSON.stringify(message) + ';\n' +
'\ttop: 0;\n' +

@@ -130,4 +139,6 @@ '\tleft: 0;\n' +

var css;
var warning;
if (error) {
css = errorCSS(error, ast);
warning = errorMessage(error, ast);
} else if (ast.toCSS) {

@@ -137,3 +148,3 @@ try {

} catch (compileError) {
css = errorCSS(compileError, ast);
warning = errorMessage(compileError, ast);
}

@@ -144,2 +155,6 @@ } else {

if (warning) {
css = errorCSS(warning.message);
}
if (cachedCSS[ast.filename] !== css) {

@@ -156,3 +171,7 @@ var cssAssetPath = ast.filename.replace(/\.less$/, '') + '.css';

data: css
}
},
transforms: [{
name: 'compileLess',
warnings: warning ? [warning] : undefined
}]
});

@@ -159,0 +178,0 @@ } else {

@@ -5,3 +5,4 @@

exports.compileLess = require('./compileLess');
exports.compileLessQuickFix = require('./compileLessQuickFix');
exports.compressText = require('./compressText');
exports.precompileHandlebars = require('./precompileHandlebars');
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