Skip to content

Commit 9d76bc5

Browse files
chore: undocument removed options (#146)
1 parent e4d718b commit 9d76bc5

File tree

4 files changed

+8
-20
lines changed

4 files changed

+8
-20
lines changed

.verb.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,9 @@ The following options may be used with the main `picomatch()` function or any of
9595
| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
9696
| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
9797
| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
98-
| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
9998
| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
10099
| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
101100
| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
102-
| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
103101
| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
104102
| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
105103
| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
@@ -111,23 +109,19 @@ The following options may be used with the main `picomatch()` function or any of
111109
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
112110
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
113111
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
114-
| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
115112
| `noext` | `boolean` | `false` | Alias for `noextglob` |
116113
| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a|b)`) |
117114
| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
118115
| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
119-
| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
120116
| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
121117
| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
122118
| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
123119
| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
124-
| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
125120
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
126121
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
127122
| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
128123
| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
129124
| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
130-
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
131125
| `windows` | `boolean` | `false` | Also accept backslashes as the path separator. |
132126

133127
### Scan Options

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,9 @@ The following options may be used with the main `picomatch()` function or any of
323323
| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
324324
| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
325325
| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
326-
| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
327326
| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
328327
| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
329328
| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
330-
| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
331329
| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
332330
| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
333331
| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
@@ -339,23 +337,19 @@ The following options may be used with the main `picomatch()` function or any of
339337
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
340338
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
341339
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
342-
| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
343340
| `noext` | `boolean` | `false` | Alias for `noextglob` |
344341
| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
345342
| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
346343
| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
347-
| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
348344
| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
349345
| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
350346
| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
351347
| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
352-
| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
353348
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
354349
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
355350
| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
356351
| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
357352
| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
358-
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
359353
| `windows` | `boolean` | `false` | Also accept backslashes as the path separator. |
360354

361355
### Scan Options

examples/match.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ const fixtures = ['a.md', 'a/b.md', './a.md', './a/b.md', 'a/b/c.md', './a/b/c.m
3333
console.log(path.posix.normalize('./{a,b,c}/*.md'));
3434
console.log(match(fixtures, './**/*.md'));
3535
// assert.deepEqual(match(fixtures, '**/*.md'), ['a.md', 'a/b.md', 'a/b/c.md', 'a\\b\\c.md']);
36-
// assert.deepEqual(match(fixtures, '**/*.md', { normalize: true, unixify: false }), ['a.md', 'a/b.md', 'a/b/c.md', 'a\\b\\c.md']);
36+
// assert.deepEqual(match(fixtures, '**/*.md', { normalize: true, windows: true }), ['a.md', 'a/b.md', 'a/b/c.md', 'a\\b\\c.md']);
3737
// assert.deepEqual(match(fixtures, '*.md'), ['a.md']);
38-
// assert.deepEqual(match(fixtures, '*.md', { normalize: true, unixify: false }), ['a.md']);
38+
// assert.deepEqual(match(fixtures, '*.md', { normalize: true, windows: true }), ['a.md']);
3939
// assert.deepEqual(match(fixtures, '*.md'), ['a.md']);
40-
// assert.deepEqual(match(fixtures, '*/*.md', { normalize: true, unixify: false }), ['a/b.md']);
40+
// assert.deepEqual(match(fixtures, '*/*.md', { normalize: true, windows: true }), ['a/b.md']);
4141
// assert.deepEqual(match(fixtures, '*/*.md'), ['a/b.md']);
42-
// assert.deepEqual(match(fixtures, './**/*.md', { normalize: true, unixify: false }), ['a.md', 'a/b.md', 'a/b/c.md', 'a\\b\\c.md', './a.md', './a/b.md', '.\\a\\b\\c.md', 'a\\b\\c.md']);
42+
// assert.deepEqual(match(fixtures, './**/*.md', { normalize: true, windows: true }), ['a.md', 'a/b.md', 'a/b/c.md', 'a\\b\\c.md', './a.md', './a/b.md', '.\\a\\b\\c.md', 'a\\b\\c.md']);
4343
// assert.deepEqual(match(fixtures, './**/*.md'), ['a.md', 'a/b.md', 'a/b/c.md']);
44-
// assert.deepEqual(match(fixtures, './*.md', { normalize: true, unixify: false }), ['a.md', './a.md']);
44+
// assert.deepEqual(match(fixtures, './*.md', { normalize: true, windows: true }), ['a.md', './a.md']);
4545
// assert.deepEqual(match(fixtures, './*.md'), ['a.md']);
46-
// assert.deepEqual(match(fixtures, './*/*.md', { normalize: true, unixify: false }), ['a/b.md', './a/b.md']);
46+
// assert.deepEqual(match(fixtures, './*/*.md', { normalize: true, windows: true }), ['a/b.md', './a/b.md']);
4747
// assert.deepEqual(match(fixtures, './*/*.md'), ['a/b.md']);
48-
// assert.deepEqual(match(['./a'], 'a'), ['./a'], { normalize: true, unixify: false });
48+
// assert.deepEqual(match(['./a'], 'a'), ['./a'], { normalize: true, windows: true });
4949
// assert.deepEqual(match(['./a'], 'a'), ['a']);

examples/option-onMatch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const onMatch = ({ glob, regex, input, output }) => {
99
// { input: 'some\\path', output: 'some/path' }
1010
};
1111

12-
const isMatch = pm.matcher('**', { onMatch, posixSlashes: true });
12+
const isMatch = pm.matcher('**', { onMatch, windows: true });
1313
isMatch('some\\path');
1414
isMatch('some\\path');
1515
isMatch('some\\path');

0 commit comments

Comments
 (0)