Socket
Socket
Sign inDemoInstall

less

Package Overview
Dependencies
Maintainers
7
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.11.2 to 3.11.3

test/less/import/json/index.json

2

CHANGELOG.md
## Change Log
### upcoming (2020-06-01)
### v3.11.2 (2020-06-01)
- [#3498](https://github.com/less/less.js/pull/3498) Remove tree caching in import manager (#3498) (@matthew-dean)

@@ -5,0 +5,0 @@ - [#3482](https://github.com/less/less.js/pull/3482) issue#3481 ignore missing debugInfo (#3482) (@5UtJAjiRWj1q)

@@ -29,2 +29,3 @@ import contexts from './contexts';

this.queue = []; // Files which haven't been imported yet
this.files = []; // List of files imported
}

@@ -55,2 +56,6 @@

else {
const files = importManager.files
if (files.indexOf(fullPath) === -1) {
files.push(fullPath)
}
if (e && !importManager.error) { importManager.error = e; }

@@ -57,0 +62,0 @@ callback(e, root, importedEqualsRoot, fullPath);

@@ -45,3 +45,3 @@ import data from './data';

const initial = {
version: [3, 11, 2],
version: [3, 11, 3],
data,

@@ -48,0 +48,0 @@ tree,

@@ -55,8 +55,4 @@ import LessError from './less-error';

result.imports = [];
for (const file in this.imports.files) {
if (this.imports.files.hasOwnProperty(file) && file !== this.imports.rootFilename) {
result.imports.push(file);
}
}
const rootFilename = this.imports.rootFilename
result.imports = this.imports.files.filter(file => file !== rootFilename);
return result;

@@ -63,0 +59,0 @@ }

{
"name": "less",
"version": "3.11.2",
"version": "3.11.3",
"description": "Leaner CSS",

@@ -5,0 +5,0 @@ "homepage": "http://lesscss.org",

<p align="center"><img src="http://lesscss.org/public/img/less_logo.png" width="264" height="117">
<p align="center"><a href="http://badge.fury.io/js/less"><a href="https://opencollective.com/less" alt="Financial Contributors on Open Collective"><img src="https://opencollective.com/less/all/badge.svg?label=financial+contributors" /></a> <img src="https://badge.fury.io/js/less.svg"></a> <a href="https://travis-ci.org/less/less.js"><img src="https://travis-ci.org/less/less.js.svg?branch=master" style="max-width:100%;"></a> <a href="https://ci.appveyor.com/project/lukeapage/less-js/branch/master"><img src="https://ci.appveyor.com/api/projects/status/bx2qspy3qbuxpl9q/branch/master?svg=true" style="max-width:100%;"></a> <a href="https://david-dm.org/less/less.js"><img src="https://david-dm.org/less/less.js.svg" style="max-width:100%;"></a> <a href="https://david-dm.org/less/less.js#info=devDependencies"><img src="https://david-dm.org/less/less.js/dev-status.svg" style="max-width:100%;"></a> <a href="https://david-dm.org/less/less.js#info=optionalDependencies"><img alt="optionalDependency Status" src="https://david-dm.org/less/less.js/optional-status.svg" style="max-width:100%;"></a> <a href="https://twitter.com/lesstocss"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/lesstocss.svg?style=flat-square" style="max-width:100%;"></a></p>
<p align="center"><a href="http://badge.fury.io/js/less"><a href="https://opencollective.com/less" alt="Financial Contributors on Open Collective"><img src="https://opencollective.com/less/all/badge.svg?label=financial+contributors" /></a> <img src="https://badge.fury.io/js/less.svg"></a> <a href="https://travis-ci.org/less/less.js"><img src="https://travis-ci.org/less/less.js.svg?branch=master" style="max-width:100%;"></a> <a href="https://ci.appveyor.com/project/lukeapage/less-js/branch/master"><img src="https://ci.appveyor.com/api/projects/status/bx2qspy3qbuxpl9q/branch/master?svg=true" style="max-width:100%;"></a> <a href="https://david-dm.org/less/less.js"><img src="https://david-dm.org/less/less.js.svg" style="max-width:100%;"></a> <a href="https://david-dm.org/less/less.js#info=devDependencies"><img src="https://david-dm.org/less/less.js/dev-status.svg" style="max-width:100%;"></a> <a href="https://twitter.com/lesstocss"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/lesstocss.svg?style=flat-square" style="max-width:100%;"></a></p>
<p align="center"><a href="https://gitter.im/less/less.js?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a> <br><sup class="rich-diff-level-one">Chat with Less.js users and contributors</sup></p>
<p align="center"><a href="https://saucelabs.com/u/less" rel="nofollow"><img src="https://saucelabs.com/browser-matrix/less.svg" alt="Sauce Test Status" style="max-width:100%;"></a></p>
# [Less.js](http://lesscss.org)

@@ -10,0 +8,0 @@

@@ -51,2 +51,8 @@ var lessTest = require('./less-test'),

}],
[{math: 'strict', strictUnits: true, globalVars: true }, 'import/json/',
lessTester.testImports, null, true,
function(filename, type, baseFolder) {
return path.join(baseFolder, filename) + '.json';
}],
[{math: 'strict', strictUnits: true, sourceMap: {sourceMapFileInline: true}},

@@ -53,0 +59,0 @@ 'sourcemaps-empty/', lessTester.testEmptySourcemap],

@@ -143,2 +143,38 @@ /* jshint latedef: nofunc */

function testImports(name, err, compiledLess, doReplacements, sourcemap, baseFolder, imports) {
if (err) {
fail('ERROR: ' + (err && err.message));
return;
}
function stringify(str) {
return JSON.stringify(imports, null, ' ')
}
/** Imports are not sorted */
const importsString = stringify(imports.sort())
fs.readFile(path.join('test/less/', name) + '.json', 'utf8', function (e, expectedImports) {
if (e) {
fail('ERROR: ' + (e && e.message));
return;
}
process.stdout.write('- ' + path.join(baseFolder, name) + ': ');
expectedImports = stringify(JSON.parse(expectedImports).sort());
expectedImports = globalReplacements(expectedImports, baseFolder);
if (expectedImports === importsString) {
ok('OK');
} else if (err) {
fail('ERROR: ' + (err && err.message));
if (isVerbose) {
process.stdout.write('\n');
process.stdout.write(err.stack + '\n');
}
} else {
difference('FAIL', expectedImports, importsString);
}
});
}
function testErrors(name, err, compiledLess, doReplacements, sourcemap, baseFolder) {

@@ -307,4 +343,9 @@ fs.readFile(path.join(baseFolder, name) + '.txt', 'utf8', function (e, expectedErr) {

/**
* @todo - refactor so the result object is sent to the verify function
*/
if (verifyFunction) {
var verificationResult = verifyFunction(name, err, result && result.css, doReplacements, result && result.map, baseFolder);
var verificationResult = verifyFunction(
name, err, result && result.css, doReplacements, result && result.map, baseFolder, result && result.imports
);
release();

@@ -367,3 +408,3 @@ return verificationResult;

diff(left, right);
diff(left || '', right || '');
endTest();

@@ -458,2 +499,3 @@ }

testSourcemap: testSourcemap,
testImports: testImports,
testEmptySourcemap: testEmptySourcemap,

@@ -460,0 +502,0 @@ testNoOptions: testNoOptions,

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 too big to display

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