Skip to content

Commit

Permalink
chore(commonjs)!: bump glob's version (#1695)
Browse files Browse the repository at this point in the history
* chore: bump glob's version

BREAKING CHANGES: Requires Node.js version >=16.0.0 or >= 14.17

* fix: let glob match alphabetical order
  • Loading branch information
younggglcy authored Jun 5, 2024
1 parent 7278248 commit 2447548
Show file tree
Hide file tree
Showing 3 changed files with 353 additions and 69 deletions.
5 changes: 2 additions & 3 deletions packages/commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"default": "./dist/cjs/index.js"
},
"engines": {
"node": ">=14.0.0"
"node": ">=16.0.0 || 14 >= 14.17"
},
"scripts": {
"build": "rollup -c",
Expand Down Expand Up @@ -65,7 +65,7 @@
"@rollup/pluginutils": "^5.0.1",
"commondir": "^1.0.1",
"estree-walker": "^2.0.2",
"glob": "^8.0.3",
"glob": "^10.4.1",
"is-reference": "1.2.1",
"magic-string": "^0.30.3"
},
Expand All @@ -75,7 +75,6 @@
"locate-character": "^2.0.5",
"require-relative": "^0.8.7",
"rollup": "^4.0.0-24",
"shx": "^0.3.4",
"source-map": "^0.7.4",
"source-map-support": "^0.5.21",
"typescript": "^4.8.3"
Expand Down
4 changes: 3 additions & 1 deletion packages/commonjs/src/dynamic-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export function getDynamicRequireModules(patterns, dynamicRequireRoot) {
isNegated
? dynamicRequireModules.delete(targetPath)
: dynamicRequireModules.set(targetPath, resolvedPath);
for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {
for (const path of glob
.sync(isNegated ? pattern.substr(1) : pattern)
.sort((a, b) => a.localeCompare(b, 'en'))) {
const resolvedPath = resolve(path);
const requirePath = normalizePathSlashes(resolvedPath);
if (isDirectory(resolvedPath)) {
Expand Down
Loading

0 comments on commit 2447548

Please sign in to comment.