Skip to content

Commit 2b693c9

Browse files
committed
Require Node.js 10
1 parent a59c278 commit 2b693c9

7 files changed

Lines changed: 17 additions & 11 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3+
- '14'
34
- '12'
45
- '10'
5-
- '8'

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ declare const matcher: {
7979
//=> false
8080
```
8181
*/
82-
isMatch(input: string | readonly string[], pattern: string | readonly string[], options?: matcher.Options): boolean;
82+
isMatch: (input: string | readonly string[], pattern: string | readonly string[], options?: matcher.Options) => boolean;
8383
};
8484

8585
export = matcher;

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ module.exports = (inputs, patterns, options) => {
3939
return inputs;
4040
}
4141

42-
const firstNegated = patterns[0][0] === '!';
42+
const isFirstPatternNegated = patterns[0][0] === '!';
4343

4444
patterns = patterns.map(pattern => makeRegexp(pattern, options));
4545

4646
const result = [];
4747

4848
for (const input of inputs) {
49-
// If first pattern is negated we include everything to match user expectation
50-
let matches = firstNegated;
49+
// If first pattern is negated we include everything to match user expectation.
50+
let matches = isFirstPatternNegated;
5151

5252
for (const pattern of patterns) {
5353
if (pattern.test(input)) {

index.test-d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {expectType} from 'tsd';
22
import matcher = require('.');
33

4+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
45
const options: matcher.Options = {};
56

67
expectType<string[]>(matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']));

license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"author": {
88
"name": "Sindre Sorhus",
99
"email": "sindresorhus@gmail.com",
10-
"url": "sindresorhus.com"
10+
"url": "https://sindresorhus.com"
1111
},
1212
"engines": {
13-
"node": ">=8"
13+
"node": ">=10"
1414
},
1515
"scripts": {
1616
"test": "xo && ava && tsd",
@@ -38,12 +38,17 @@
3838
"minimatch"
3939
],
4040
"dependencies": {
41-
"escape-string-regexp": "^2.0.0"
41+
"escape-string-regexp": "^4.0.0"
4242
},
4343
"devDependencies": {
4444
"ava": "^2.4.0",
4545
"matcha": "^0.7.0",
4646
"tsd": "^0.11.0",
47-
"xo": "^0.25.3"
47+
"xo": "^0.30.0"
48+
},
49+
"xo": {
50+
"rules": {
51+
"@typescript-eslint/member-ordering": "off"
52+
}
4853
}
4954
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# matcher [![Build Status](https://travis-ci.org/sindresorhus/matcher.svg?branch=master)](https://travis-ci.org/sindresorhus/matcher)
1+
# matcher [![Build Status](https://travis-ci.com/sindresorhus/matcher.svg?branch=master)](https://travis-ci.com/sindresorhus/matcher)
22

33
> Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching
44

0 commit comments

Comments
 (0)