Skip to content

Commit afcc18a

Browse files
authored
Merge pull request #182 from bcomnes/beta
2 parents fb6721a + e23faea commit afcc18a

File tree

4 files changed

+40
-9
lines changed

4 files changed

+40
-9
lines changed

CHANGELOG.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
99

10-
## [v8.0.3](https://github.com/bcomnes/npm-run-all2/compare/v8.0.2...v8.0.3)
10+
## [v8.0.4-beta.0](https://github.com/bcomnes/npm-run-all2/compare/v8.0.3...v8.0.4-beta.0)
11+
12+
### Merged
13+
14+
- add tests for double stars [`#179`](https://github.com/bcomnes/npm-run-all2/pull/179)
15+
16+
### Commits
17+
18+
- Merge pull request #180 from bcomnes/simplify-lifecycles [`fb6721a`](https://github.com/bcomnes/npm-run-all2/commit/fb6721a1d537f0db9bb87645f158a573343c717a)
19+
- fix new test [`3c0d2b2`](https://github.com/bcomnes/npm-run-all2/commit/3c0d2b29e32c07f2a943d5c9451843a57664fcc8)
20+
- Improve npm lifecycles [`530288e`](https://github.com/bcomnes/npm-run-all2/commit/530288e7d2985dbb7dcc8f6f6347c0c761d3b4af)
21+
22+
## [v8.0.3](https://github.com/bcomnes/npm-run-all2/compare/v8.0.2...v8.0.3) - 2025-05-20
1123

1224
### Commits
1325

@@ -321,8 +333,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
321333

322334
### Commits
323335

324-
- 🐛 use pidtree [`1b41ac5`](https://github.com/bcomnes/npm-run-all2/commit/1b41ac569987c96e224f940ff59f9699322c7824)
325336
- ⬆️ update dependencies [`7ec542e`](https://github.com/bcomnes/npm-run-all2/commit/7ec542e95ceb922b9abe593270d9b6f8e0df4bc5)
337+
- 🐛 use pidtree [`1b41ac5`](https://github.com/bcomnes/npm-run-all2/commit/1b41ac569987c96e224f940ff59f9699322c7824)
326338
- 🔖 4.1.5 [`df15118`](https://github.com/bcomnes/npm-run-all2/commit/df1511851a2b5e8a406e4a2622829b360f671afc)
327339

328340
## [v4.1.4](https://github.com/bcomnes/npm-run-all2/compare/v4.1.3...v4.1.4) - 2018-11-24

lib/match-tasks.js

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

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

1615
// ------------------------------------------------------------------------------
1716
// Helpers
@@ -21,7 +20,7 @@ const COLON_OR_SLASH = /[:/]/g
2120
const CONVERT_MAP = { ':': '/', '/': ':' }
2221

2322
/**
24-
* Swaps ":" and "/", in order to use ":" as the separator in minimatch.
23+
* Swaps ":" and "/", in order to use ":" as the separator in picomatch.
2524
*
2625
* @param {string} s - A text to swap.
2726
* @returns {string} The text which was swapped.
@@ -44,8 +43,10 @@ function createFilter (pattern) {
4443
const spacePos = trimmed.indexOf(' ')
4544
const task = spacePos < 0 ? trimmed : trimmed.slice(0, spacePos)
4645
const args = spacePos < 0 ? '' : trimmed.slice(spacePos)
47-
const matcher = new Minimatch(swapColonAndSlash(task), { nonegate: true })
48-
const match = matcher.match.bind(matcher)
46+
const match = picomatch(swapColonAndSlash(task), {
47+
nonegate: true,
48+
strictSlashes: true,
49+
})
4950

5051
return { match, task, args }
5152
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "npm-run-all2",
33
"type": "commonjs",
4-
"version": "8.0.3",
4+
"version": "8.0.4-beta.0",
55
"description": "A CLI tool to run multiple npm-scripts in parallel or sequential. (Maintenance fork)",
66
"bin": {
77
"run-p": "bin/run-p/index.js",
@@ -33,7 +33,7 @@
3333
"ansi-styles": "^6.2.1",
3434
"cross-spawn": "^7.0.6",
3535
"memorystream": "^0.3.1",
36-
"minimatch": "^10.0.1",
36+
"picomatch": "^4.0.2",
3737
"pidtree": "^0.6.0",
3838
"read-package-json-fast": "^4.0.0",
3939
"shell-quote": "^1.7.3",

test/pattern.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ describe('[pattern] it should run matched tasks if glob like patterns are given.
5050
})
5151
})
5252

53+
describe('"test-task:append:**" to "test-task:append:a", "test-task:append:a:c", "test-task:append:a:d", and "test-task:append:b"', () => {
54+
it('Node API', async () => {
55+
await nodeApi('test-task:append:**')
56+
assert(result() === 'aaacacadadbb')
57+
})
58+
59+
it('npm-run-all command', async () => {
60+
await runAll(['test-task:append:**'])
61+
assert(result() === 'aaacacadadbb')
62+
})
63+
64+
it('run-s command', async () => {
65+
await runSeq(['test-task:append:**'])
66+
assert(result() === 'aaacacadadbb')
67+
})
68+
})
69+
70+
// should act same way as section above
5371
describe('"test-task:append:**:*" to "test-task:append:a", "test-task:append:a:c", "test-task:append:a:d", and "test-task:append:b"', () => {
5472
it('Node API', async () => {
5573
await nodeApi('test-task:append:**:*')

0 commit comments

Comments
 (0)