pretty-quick
Advanced tools
Comparing version 1.8.1 to 1.9.0
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _createMatcher = require('./createMatcher'); | ||
var _createMatcher2 = _interopRequireDefault(_createMatcher); | ||
var _isSupportedExtension = require('./isSupportedExtension'); | ||
@@ -30,2 +34,3 @@ | ||
staged, | ||
pattern, | ||
restage = true, | ||
@@ -53,5 +58,5 @@ branch, | ||
const changedFiles = scm.getChangedFiles(directory, revision, staged).filter(_isSupportedExtension2.default).filter(rootIgnorer).filter(cwdIgnorer); | ||
const changedFiles = scm.getChangedFiles(directory, revision, staged).filter(_isSupportedExtension2.default).filter((0, _createMatcher2.default)(pattern)).filter(rootIgnorer).filter(cwdIgnorer); | ||
const unstagedFiles = staged ? scm.getUnstagedChangedFiles(directory, revision).filter(_isSupportedExtension2.default).filter(rootIgnorer).filter(cwdIgnorer) : []; | ||
const unstagedFiles = staged ? scm.getUnstagedChangedFiles(directory, revision).filter(_isSupportedExtension2.default).filter((0, _createMatcher2.default)(pattern)).filter(rootIgnorer).filter(cwdIgnorer) : []; | ||
@@ -58,0 +63,0 @@ const wasFullyStaged = f => unstagedFiles.indexOf(f) < 0; |
{ | ||
"name": "pretty-quick", | ||
"version": "1.8.1", | ||
"version": "1.9.0", | ||
"description": "Get Pretty Quick", | ||
@@ -31,3 +31,4 @@ "repository": "azz/pretty-quick", | ||
"ignore": "^3.3.7", | ||
"mri": "^1.1.0" | ||
"mri": "^1.1.0", | ||
"multimatch": "^3.0.0" | ||
}, | ||
@@ -34,0 +35,0 @@ "scripts": { |
@@ -91,2 +91,7 @@ # `pretty-quick` | ||
### `--pattern` | ||
Filters the files for the given [minimatch](https://github.com/isaacs/minimatch) pattern. | ||
For example `pretty-quick --pattern "**/*.*(js|jsx)"` or `pretty-quick --pattern "**/*.js" --pattern "**/*.jsx"` | ||
### `--verbose` | ||
@@ -93,0 +98,0 @@ |
46141
14
252
117
7
+ Addedmultimatch@^3.0.0
+ Addedarray-differ@2.1.0(transitive)
+ Addedarray-union@1.0.2(transitive)
+ Addedarray-uniq@1.0.3(transitive)
+ Addedarrify@1.0.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedmultimatch@3.0.0(transitive)