Skip to content

Commit 75bb00e

Browse files
authored
Merge pull request #175 from bcomnes/revert-pico
2 parents 9a976b1 + 5d93a54 commit 75bb00e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/match-tasks.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
// Requirements
1111
// ------------------------------------------------------------------------------
1212

13-
const picomatch = require('picomatch')
13+
const { minimatch } = require('minimatch')
14+
const Minimatch = minimatch.Minimatch
1415

1516
// ------------------------------------------------------------------------------
1617
// Helpers
@@ -20,7 +21,7 @@ const COLON_OR_SLASH = /[:/]/g
2021
const CONVERT_MAP = { ':': '/', '/': ':' }
2122

2223
/**
23-
* Swaps ":" and "/", in order to use ":" as the separator in picomatch.
24+
* Swaps ":" and "/", in order to use ":" as the separator in minimatch.
2425
*
2526
* @param {string} s - A text to swap.
2627
* @returns {string} The text which was swapped.
@@ -43,7 +44,8 @@ function createFilter (pattern) {
4344
const spacePos = trimmed.indexOf(' ')
4445
const task = spacePos < 0 ? trimmed : trimmed.slice(0, spacePos)
4546
const args = spacePos < 0 ? '' : trimmed.slice(spacePos)
46-
const match = picomatch(swapColonAndSlash(task), { nonegate: true })
47+
const matcher = new Minimatch(swapColonAndSlash(task), { nonegate: true })
48+
const match = matcher.match.bind(matcher)
4749

4850
return { match, task, args }
4951
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"ansi-styles": "^6.2.1",
3535
"cross-spawn": "^7.0.6",
3636
"memorystream": "^0.3.1",
37-
"picomatch": "^4.0.2",
37+
"minimatch": "^10.0.1",
3838
"pidtree": "^0.6.0",
3939
"read-package-json-fast": "^4.0.0",
4040
"shell-quote": "^1.7.3",

0 commit comments

Comments
 (0)