Skip to content

Commit 2447548

Browse files
authored
chore(commonjs)!: bump glob's version (#1695)
* chore: bump glob's version BREAKING CHANGES: Requires Node.js version >=16.0.0 or >= 14.17 * fix: let glob match alphabetical order
1 parent 7278248 commit 2447548

File tree

3 files changed

+353
-69
lines changed

3 files changed

+353
-69
lines changed

packages/commonjs/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"default": "./dist/cjs/index.js"
2222
},
2323
"engines": {
24-
"node": ">=14.0.0"
24+
"node": ">=16.0.0 || 14 >= 14.17"
2525
},
2626
"scripts": {
2727
"build": "rollup -c",
@@ -65,7 +65,7 @@
6565
"@rollup/pluginutils": "^5.0.1",
6666
"commondir": "^1.0.1",
6767
"estree-walker": "^2.0.2",
68-
"glob": "^8.0.3",
68+
"glob": "^10.4.1",
6969
"is-reference": "1.2.1",
7070
"magic-string": "^0.30.3"
7171
},
@@ -75,7 +75,6 @@
7575
"locate-character": "^2.0.5",
7676
"require-relative": "^0.8.7",
7777
"rollup": "^4.0.0-24",
78-
"shx": "^0.3.4",
7978
"source-map": "^0.7.4",
8079
"source-map-support": "^0.5.21",
8180
"typescript": "^4.8.3"

packages/commonjs/src/dynamic-modules.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export function getDynamicRequireModules(patterns, dynamicRequireRoot) {
4141
isNegated
4242
? dynamicRequireModules.delete(targetPath)
4343
: dynamicRequireModules.set(targetPath, resolvedPath);
44-
for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {
44+
for (const path of glob
45+
.sync(isNegated ? pattern.substr(1) : pattern)
46+
.sort((a, b) => a.localeCompare(b, 'en'))) {
4547
const resolvedPath = resolve(path);
4648
const requirePath = normalizePathSlashes(resolvedPath);
4749
if (isDirectory(resolvedPath)) {

0 commit comments

Comments
 (0)