Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-less-changed

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-less-changed - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

29

gulpfile.js

@@ -7,2 +7,3 @@ var gulp = require('gulp');

var os = require('os');
var lazypipe = require('lazypipe');

@@ -14,5 +15,5 @@ var tsProject = plugins.typescript.createProject('tsconfig.json', {

gulp.task('compile', function () {
var tsResult = gulp.src(['src/**/*.ts', 'src/*.d.ts', 'typings/index.d.ts'])
var tsResult = gulp.src(['src/**/*.ts', 'src/*.d.ts'])
.pipe(plugins.sourcemaps.init())
.pipe(plugins.typescript(tsProject));
.pipe(tsProject());

@@ -33,19 +34,7 @@ return merge([

// http://stackoverflow.com/questions/22155106/typescript-code-coverage-of-multiple-extends-declarations/26321994#26321994
function istanbulIgnoreTypeScriptExtend() {
var tsExtends = /var __extends =/;
return through2.obj(function(file, enc, done) {
if (file.isBuffer() && tsExtends.test(file.contents)) {
var rows = file.contents.toString().split('\n');
for (var i = 0; i < rows.length; i++) {
if (rows[i].indexOf('var __extends =') === 0) {
rows.splice(i, 0, '/* istanbul ignore next: TypeScript extend */');
break;
}
}
file.contents = new Buffer(rows.join(os.EOL));
}
this.push(file);
done();
});
function istanbulTypeScriptIgnores() {
var ignoreReplacement = '/* istanbul ignore next */\n$1'
return lazypipe()
.pipe(plugins.replace, /(var __extends =)/, ignoreReplacement)
.pipe(plugins.replace, /(var _this = _super\.call)/, ignoreReplacement)();
}

@@ -55,3 +44,3 @@

return gulp.src(['release/**/*.js'])
.pipe(istanbulIgnoreTypeScriptExtend())
.pipe(istanbulTypeScriptIgnores())
// Covering files

@@ -58,0 +47,0 @@ .pipe(plugins.istanbul())

{
"name": "gulp-less-changed",
"version": "1.2.0",
"version": "1.2.1",
"description": "Only pass .less files through the gulp stream if they or their dependencies have changed",

@@ -28,21 +28,29 @@ "main": "release/main.js",

"devDependencies": {
"@types/bluebird-global": "^3.0.1",
"@types/core-js": "^0.9.35",
"@types/gulp-util": "^3.0.30",
"@types/less": "https://registry.npmjs.org/@types/less/-/less-0.0.32.tgz",
"@types/mkdirp": "^0.3.29",
"@types/through2": "^2.0.32",
"@types/vinyl": "^2.0.0",
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"coveralls": "^2.11.15",
"fake-fs": "^0.5.0",
"gulp": "^3.9.0",
"gulp-istanbul": "^0.10.3",
"gulp-load-plugins": "^1.2.0",
"gulp-mocha": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-typescript": "^2.12.1",
"merge2": "^1.0.2",
"mocha": "^2.4.5",
"gulp": "^3.9.1",
"gulp-istanbul": "^1.1.1",
"gulp-load-plugins": "^1.4.0",
"gulp-mocha": "^3.0.1",
"gulp-replace": "^0.5.4",
"gulp-sourcemaps": "^2.2.1",
"gulp-typescript": "^3.1.3",
"lazypipe": "^1.0.1",
"merge2": "^1.0.3",
"mocha": "^3.2.0",
"pmock": "^0.2.3",
"proxyquire": "^1.7.4",
"semantic-release": "^4.3.5",
"sinon": "^1.17.3",
"proxyquire": "^1.7.10",
"semantic-release": "^6.3.5",
"sinon": "^1.17.7",
"sinon-chai": "^2.8.0",
"stream-assert": "^2.0.3",
"through2": "^2.0.0",
"typescript": "^1.7.5"
"typescript": "^2.1.4"
},

@@ -49,0 +57,0 @@ "dependencies": {

"use strict";
var data_uri_visitor_1 = require('./data-uri-visitor');
var data_uri_visitor_1 = require("./data-uri-visitor");
var dataUriVisitorPlugin;

@@ -4,0 +4,0 @@ (function (dataUriVisitorPlugin) {

"use strict";
var path = require("path");
var dataUriVisitor;

@@ -28,4 +29,8 @@ (function (dataUriVisitor) {

}
if (!argument.value) {
return ruleNode;
}
var importedFile = argument.value;
this._imports.push({ directory: ruleNode.currentFileInfo.entryPath, relativePath: importedFile });
var entryPath = ruleNode.currentFileInfo.entryPath;
this._imports.push({ directory: entryPath ? path.normalize(entryPath) : '', relativePath: importedFile });
return ruleNode;

@@ -32,0 +37,0 @@ };

@@ -7,8 +7,8 @@ 'use strict';

};
var fs = require('fs');
var Promise = require('bluebird');
var path = require('path');
var os = require('os');
var crypto = require('crypto');
var mkdirp = require('mkdirp');
var fs = require("fs");
var Promise = require("bluebird");
var path = require("path");
var os = require("os");
var crypto = require("crypto");
var mkdirp = require("mkdirp");
var fsAsync = Promise.promisifyAll(fs);

@@ -20,4 +20,6 @@ var mkdirpAsync = Promise.promisify(mkdirp);

__extends(ExpectedError, _super);
function ExpectedError() {
_super.apply(this, arguments);
function ExpectedError(message) {
var _this = _super.call(this, message) || this;
Object.setPrototypeOf(_this, ExpectedError.prototype);
return _this;
}

@@ -47,8 +49,9 @@ return ExpectedError;

if (!same) {
return Promise.reject(new ExpectedError('changed'));
throw new ExpectedError('changed');
}
return Promise.resolve(same);
return true;
})
.catch(function () {
return Promise.reject(new ExpectedError('changed'));
.catch(ExpectedError, function (err) { throw err; })
.catch(function (err) {
throw new ExpectedError('changed');
});

@@ -105,3 +108,3 @@ };

.then(function (results) {
return Promise.resolve(existingImports);
return existingImports;
})

@@ -108,0 +111,0 @@ .catch(ExpectedError, function () {

'use strict';
var fs = require('fs');
var less = require('less');
var streamToArray = require('stream-to-array');
var Promise = require('bluebird');
var path_resolver_1 = require('./path-resolver');
var data_uri_visitor_plugin_1 = require('./data-uri-visitor-plugin');
var fs = require("fs");
var less = require("less");
var streamToArray = require("stream-to-array");
var Promise = require("bluebird");
var path_resolver_1 = require("./path-resolver");
var data_uri_visitor_plugin_1 = require("./data-uri-visitor-plugin");
var fsAsync = Promise.promisifyAll(fs);

@@ -28,3 +28,3 @@ var assign = require('object-assign');

var part = parts[i];
buffers.push((part instanceof Buffer) ? part : new Buffer(part));
buffers.push(Buffer.from(part));
}

@@ -31,0 +31,0 @@ return Buffer.concat(buffers).toString();

'use strict';
var Promise = require('bluebird');
var through = require('through2');
var fs = require('fs');
var gutil = require('gulp-util');
var import_lister_1 = require('./import-lister');
var import_buffer_1 = require('./import-buffer');
var crypto = require('crypto');
var Promise = require("bluebird");
var through = require("through2");
var fs = require("fs");
var gutil = require("gulp-util");
var import_lister_1 = require("./import-lister");
var import_buffer_1 = require("./import-buffer");
var crypto = require("crypto");
var fsAsync = Promise.promisifyAll(fs);

@@ -51,3 +51,3 @@ var MODULE_NAME = 'gulp-less-changed';

if (intermediateResult.changed) {
return Promise.resolve(false);
return false;
}

@@ -54,0 +54,0 @@ return checkImportsHaveChanged(file, intermediateResult.outputAge, importBuffer)

@@ -7,5 +7,5 @@ 'use strict';

};
var fs = require('fs');
var path = require('path');
var Promise = require('bluebird');
var fs = require("fs");
var path = require("path");
var Promise = require("bluebird");
var fsAsync = Promise.promisifyAll(fs);

@@ -17,6 +17,8 @@ var pathResolver;

function PathResolverError(message) {
_super.call(this, message);
this.message = message;
this.name = this.constructor.name;
Error.captureStackTrace(this, this.name);
var _this = _super.call(this, message) || this;
_this.message = message;
_this.name = _this.constructor.name;
Object.setPrototypeOf(_this, PathResolverError.prototype);
Error.captureStackTrace(_this, _this.name);
return _this;
}

@@ -37,3 +39,3 @@ return PathResolverError;

return fsAsync.statAsync(path)
.then(function (stat) { return Promise.resolve(path); })
.then(function (stat) { return path; })
.catch(function (error) {

@@ -56,4 +58,4 @@ return null;

if (result === null) {
var triedPathsDisplay = pathsToTry.map(function (p) { return ("'" + p + "'"); }).join(', ');
return Promise.reject(new PathResolverError("Import file '" + inputPath + "' wasn't found. Tried: " + triedPathsDisplay + "."));
var triedPathsDisplay = pathsToTry.map(function (p) { return "'" + p + "'"; }).join(', ');
throw new PathResolverError("Import file '" + inputPath + "' wasn't found. Tried: " + triedPathsDisplay + ".");
}

@@ -60,0 +62,0 @@ return result;

@@ -5,3 +5,10 @@ {

"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"typeRoots": [
"../node_modules/@types"
],
"types": [
"core-js"
],
"preserveConstEnums": true,

@@ -8,0 +15,0 @@ "removeComments": true,

Sorry, the diff of this file is not supported yet

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

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