diff --git a/lib/index.js b/lib/index.js index f93bc29..cd9b65d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,11 +1,9 @@ -const { promisify } = require('util') const path = require('path') const getName = require('@npmcli/name-from-folder') const minimatch = require('minimatch') const rpj = require('read-package-json-fast') const glob = require('glob') -const pGlob = promisify(glob) function appendNegatedPatterns (patterns) { const results = [] @@ -98,7 +96,9 @@ async function mapWorkspaces (opts = {}) { const getPackagePathname = pkgPathmame(opts) for (const item of patterns) { - const matches = await pGlob(getGlobPattern(item.pattern), getGlobOpts()) + let matches = await glob(getGlobPattern(item.pattern), getGlobOpts()) + // preserves glob@8 behavior + matches = matches.sort((a, b) => a.localeCompare(b, 'en')) for (const match of matches) { let pkg diff --git a/package.json b/package.json index b18bd80..7141dc6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@npmcli/name-from-folder": "^2.0.0", - "glob": "^8.0.1", + "glob": "^9.3.1", "minimatch": "^7.4.2", "read-package-json-fast": "^3.0.0" },