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

gulp-match

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-match - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

.jshintignore

10

index.js

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

module.exports = function (file, condition) {
module.exports = function (file, condition, options) {
if (!file) {

@@ -26,3 +26,3 @@ throw new Error('gulp-match: vinyl file required');

// FRAGILE: ASSUME: it's a regex
return condition.test(file.path);
return condition.test(file.relative);
}

@@ -32,3 +32,3 @@

// FRAGILE: ASSUME: it's a minimatch expression
return minimatch(file.path, condition);
return minimatch(file.relative, condition, options);
}

@@ -45,6 +45,6 @@

if (step[0] === '!') {
if (minimatch(file.path, step.slice(1))) {
if (minimatch(file.relative, step.slice(1), options)) {
return false;
}
} else if (minimatch(file.path, step)) {
} else if (minimatch(file.relative, step, options)) {
ret = true;

@@ -51,0 +51,0 @@ }

{
"name": "gulp-match",
"description": "Does a vinyl file match a condition?",
"version": "0.2.1",
"version": "1.0.0",
"homepage": "https://github.com/robrich/gulp-match",

@@ -16,11 +16,11 @@ "repository": "git://github.com/robrich/gulp-match.git",

"dependencies": {
"minimatch": "^1.0.0"
"minimatch": "^3.0.0"
},
"devDependencies": {
"jshint": "^2.5.2",
"mocha": "^1.20.1",
"should": "^4.0.4"
"jshint": "^2.8.0",
"mocha": "^2.3.3",
"should": "^7.1.0"
},
"scripts": {
"test": "mocha && jshint ./index.js ./test/."
"test": "mocha && jshint ."
},

@@ -30,8 +30,3 @@ "engines": {

},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/robrich/gulp-match/raw/master/LICENSE"
}
]
"license": "MIT"
}
gulp-match ![status](https://secure.travis-ci.org/robrich/gulp-match.png?branch=master)
==========
Does a vinyl file match a condition? This function checks the condition on the `file.path` of the
Does a vinyl file match a condition? This function checks the condition on the `file.path` of the
[vinyl-fs](https://github.com/wearefractal/vinyl-fs) file passed to it.

@@ -18,6 +18,7 @@

var condition = true; // TODO: add business logic here
var options = null; // Optionally pass options to minimatch
vinylfs.src('path/to/file.js')
.pipe(map(function (file, cb) {
var match = gulpmatch(file, condition);
var match = gulpmatch(file, condition, options);
if (match) {

@@ -84,3 +85,3 @@ // it matched, do stuff

If the condition is an object with a `isFile` or `isDirectory` property, it'll match the details on the
If the condition is an object with a `isFile` or `isDirectory` property, it'll match the details on the
[vinyl-fs](https://github.com/wearefractal/vinyl-fs) file's [`stat`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object.

@@ -101,3 +102,9 @@

### options
#### minimatch options object
See [https://github.com/isaacs/minimatch](minimatch) for options docs.
LICENSE

@@ -104,0 +111,0 @@ -------

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