Socket
Socket
Sign inDemoInstall

less

Package Overview
Dependencies
Maintainers
5
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less - npm Package Compare versions

Comparing version 3.0.2 to 3.0.4

test/browser/less.js

16

Gruntfile.js

@@ -190,3 +190,7 @@ 'use strict';

plugin: {
command: 'node bin/lessc --clean-css="--s1 --advanced" test/less/lazy-eval.less tmp/lazy-eval.css'
command: [
'node bin/lessc --clean-css="--s1 --advanced" test/less/lazy-eval.less tmp/lazy-eval.css',
'cd lib',
'node ../bin/lessc --clean-css="--s1 --advanced" ../test/less/lazy-eval.less ../tmp/lazy-eval.css'
].join(' && ')
},

@@ -197,3 +201,3 @@ "sourcemap-test": {

'node bin/lessc --source-map test/less/sourcemaps/basic.less test/sourcemaps/basic.css'
].join('&&')
].join(' && ')
}

@@ -513,7 +517,2 @@ },

// var sauceTests = [];
// browserTests.map(function(testName) {
// sauceTests.push('saucelabs-jasmine:' + testName);
// });
grunt.registerTask('sauce-after-setup', [

@@ -543,2 +542,5 @@ 'saucelabs-jasmine:all',

// Run shell plugin test
grunt.registerTask('shell-plugin', ['shell:plugin']);
// Run all tests

@@ -545,0 +547,0 @@ grunt.registerTask('quicktest', testTasks.slice(0, -1));

@@ -27,3 +27,5 @@ var path = require('path'),

explicit = prefix === "." || prefix === "/",
result = null;
result = null,
isNodeModule = false,
npmPrefix = 'npm://';

@@ -36,5 +38,2 @@ options = options || {};

// Search node_modules
if (!explicit) { paths.push.apply(paths, this.modulePaths); }
if (!isAbsoluteFilename && paths.indexOf('.') === -1) { paths.push('.'); }

@@ -75,2 +74,3 @@

if (j < prefixes.length) {
isNodeModule = false;
fullFilename = fileParts.rawPath + prefixes[j] + fileParts.filename;

@@ -82,11 +82,34 @@

if (paths[i].indexOf('node_modules') > -1) {
if (!explicit && paths[i] === '.') {
try {
fullFilename = require.resolve(fullFilename);
isNodeModule = true;
}
catch (e) {}
catch (e) {
filenamesTried.push(npmPrefix + fullFilename);
tryWithExtension();
}
}
else {
tryWithExtension();
}
fullFilename = options.ext ? self.tryAppendExtension(fullFilename, options.ext) : fullFilename;
function tryWithExtension() {
var extFilename = options.ext ? self.tryAppendExtension(fullFilename, options.ext) : fullFilename;
if (extFilename !== fullFilename && !explicit && paths[i] === '.') {
try {
fullFilename = require.resolve(extFilename);
isNodeModule = true;
}
catch (e) {
filenamesTried.push(npmPrefix + extFilename);
fullFilename = extFilename;
}
}
else {
fullFilename = extFilename;
}
}
if (self.contents[fullFilename]) {

@@ -107,3 +130,3 @@ fulfill({ contents: self.contents[fullFilename], filename: fullFilename});

catch (e) {
filenamesTried.push(fullFilename);
filenamesTried.push(isNodeModule ? npmPrefix + fullFilename : fullFilename);
return tryPrefix(j + 1);

@@ -115,3 +138,3 @@ }

if (e) {
filenamesTried.push(fullFilename);
filenamesTried.push(isNodeModule ? npmPrefix + fullFilename : fullFilename);
return tryPrefix(j + 1);

@@ -118,0 +141,0 @@ }

@@ -19,5 +19,2 @@ var environment = require("./environment"),

less.options = require('../less/default-options')();
less.options.paths = [
path.join(process.cwd(), "node_modules")
];

@@ -24,0 +21,0 @@ // provide image-size functionality

@@ -5,3 +5,3 @@ module.exports = function(environment, fileManagers) {

var initial = {
version: [3, 0, 1],
version: [3, 0, 4],
data: require('./data'),

@@ -8,0 +8,0 @@ tree: require('./tree'),

@@ -45,3 +45,3 @@ var Node = require("./node"),

Unit.prototype.isLength = function () {
return Boolean(this.toCSS().match(/px|em|%|in|cm|mm|pc|pt|ex/));
return RegExp('^(px|em|ex|ch|rem|in|cm|mm|pc|pt|ex|vw|vh|vmin|vmax)$', 'gi').test(this.toCSS());
};

@@ -48,0 +48,0 @@ Unit.prototype.isEmpty = function () {

{
"name": "less",
"version": "3.0.2",
"version": "3.0.4",
"description": "Leaner CSS",

@@ -50,3 +50,3 @@ "homepage": "http://lesscss.org",

"request": "^2.83.0",
"source-map": "^0.5.3"
"source-map": "~0.6.0"
},

@@ -53,0 +53,0 @@ "devDependencies": {

@@ -1,3 +0,3 @@

FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status}{node}. Tried - {path}file-does-not-exist.less,{pathrel}file-does-not-exist.less,{nodepath}file-does-not-exist.less,file-does-not-exist.less{/node} in {path}import-missing.less on line 6, column 1:
FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status}{node}. Tried - {path}file-does-not-exist.less,{pathrel}file-does-not-exist.less,npm://file-does-not-exist.less,file-does-not-exist.less{/node} in {path}import-missing.less on line 6, column 1:
5
6 @import "file-does-not-exist.less";

@@ -1,3 +0,3 @@

FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status}{node}. Tried - {path}file-does-not-exist.less,{pathrel}file-does-not-exist.less,{nodepath}file-does-not-exist.less,file-does-not-exist.less{/node} in {path}import-missing.less on line 6, column 1:
FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status}{node}. Tried - {path}file-does-not-exist.less,{pathrel}file-does-not-exist.less,npm://file-does-not-exist.less,file-does-not-exist.less{/node} in {path}import-missing.less on line 6, column 1:
5
6 @import "file-does-not-exist.less";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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