diff --git a/CHANGELOG.md b/CHANGELOG.md index 78845c4..d486473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v8.0.1](https://github.com/bcomnes/npm-run-all2/compare/v8.0.0...v8.0.1) +## [v8.0.2](https://github.com/bcomnes/npm-run-all2/compare/v8.0.1...v8.0.2) + +### Commits + +- Merge pull request #172 from beeequeue/picomatch [`4f42923`](https://github.com/bcomnes/npm-run-all2/commit/4f42923e1fdea84fc97796e774a5550e8f78f092) +- replace minimatch with picomatch [`74201f5`](https://github.com/bcomnes/npm-run-all2/commit/74201f5f7238d9a2c9d5e7b889db8748687fd4f9) +- add type field [`e8f046a`](https://github.com/bcomnes/npm-run-all2/commit/e8f046af4d4c14b61449695c7eb58f6a385ab2b6) + +## [v8.0.1](https://github.com/bcomnes/npm-run-all2/compare/v8.0.0...v8.0.1) - 2025-05-02 ### Commits diff --git a/lib/match-tasks.js b/lib/match-tasks.js index 8708dff..138f37a 100644 --- a/lib/match-tasks.js +++ b/lib/match-tasks.js @@ -10,8 +10,7 @@ // Requirements // ------------------------------------------------------------------------------ -const { minimatch } = require('minimatch') -const Minimatch = minimatch.Minimatch +const picomatch = require('picomatch') // ------------------------------------------------------------------------------ // Helpers @@ -21,7 +20,7 @@ const COLON_OR_SLASH = /[:/]/g const CONVERT_MAP = { ':': '/', '/': ':' } /** - * Swaps ":" and "/", in order to use ":" as the separator in minimatch. + * Swaps ":" and "/", in order to use ":" as the separator in picomatch. * * @param {string} s - A text to swap. * @returns {string} The text which was swapped. @@ -44,8 +43,7 @@ function createFilter (pattern) { const spacePos = trimmed.indexOf(' ') const task = spacePos < 0 ? trimmed : trimmed.slice(0, spacePos) const args = spacePos < 0 ? '' : trimmed.slice(spacePos) - const matcher = new Minimatch(swapColonAndSlash(task), { nonegate: true }) - const match = matcher.match.bind(matcher) + const match = picomatch(swapColonAndSlash(task), { nonegate: true }) return { match, task, args } } diff --git a/package.json b/package.json index 3b8d168..e289f70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "npm-run-all2", - "version": "8.0.1", + "type": "commonjs", + "version": "8.0.2", "description": "A CLI tool to run multiple npm-scripts in parallel or sequential. (Maintenance fork)", "bin": { "run-p": "bin/run-p/index.js", @@ -33,7 +34,7 @@ "ansi-styles": "^6.2.1", "cross-spawn": "^7.0.6", "memorystream": "^0.3.1", - "minimatch": "^10.0.1", + "picomatch": "^4.0.2", "pidtree": "^0.6.0", "read-package-json-fast": "^4.0.0", "shell-quote": "^1.7.3",