diff --git a/package.json b/package.json index 5b16c553..72eafc95 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ "cz-conventional-changelog": "3.3.0", "dedent": "1.7.2", "detect-indent": "7.0.2", - "glob": "15.0.0", "inquirer": "8.2.7", "minimist": "1.2.8", "strip-json-comments": "5.1.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd1891db..be608b88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -197,9 +197,6 @@ importers: detect-indent: specifier: 7.0.2 version: 7.0.2 - glob: - specifier: 15.0.0 - version: 15.0.0 inquirer: specifier: 8.2.7 version: 8.2.7 @@ -1684,10 +1681,6 @@ packages: resolution: {integrity: sha512-ob8P0VbyEjcLG2ycNYmzYhZj65kkcN5b7tt5moGhTq3rkXtuU8MB+i0GIzPtLnSHVF2DkK4M+nQRojDvsOGVJw==} engines: {node: 18 || 20 || >=22} - glob@15.0.0: - resolution: {integrity: sha512-tiRK5MxAsWTadBLU7T3r2hanLM785BdqH9cfQ9wSTQNU+yULR5gTNiHjB1jpp88qIbX1U+rdrCUXhNv9A2G91g==} - engines: {node: 20 || >=22} - glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me @@ -2504,10 +2497,6 @@ packages: resolution: {integrity: sha512-Ie3c3F+7WJOUCr0r8V8uEunY5Sj4PGFDoBZvFw7JmHJs/+H5GZK+GsIM8tHMcZy7c27Zj+U1NOcVzqlC7tBJpg==} engines: {node: 18 || 20 || >=22} - path-scurry@4.1.0: - resolution: {integrity: sha512-V/lmmLwmIUkQzwMR7vAvmTfFH6Pq3QLJryRRO7QSEH5ZpjxpWXA5hGVH1fVnUaT8q8qb1J08NGaaTu501JLRnA==} - engines: {node: 20 || >=22} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -4800,11 +4789,6 @@ snapshots: minipass: 7.1.3 path-scurry: 3.0.3 - glob@15.0.0: - dependencies: - minimatch: 11.0.10 - path-scurry: 4.1.0 - glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -5493,8 +5477,6 @@ snapshots: lru-cache: 11.5.4 minipass: 7.1.3 - path-scurry@4.1.0: {} - path-type@4.0.0: {} picocolors@1.1.1: {} diff --git a/src/configLoader/findup.js b/src/configLoader/findup.js index a5dd8f4a..7b3ecf09 100644 --- a/src/configLoader/findup.js +++ b/src/configLoader/findup.js @@ -1,5 +1,5 @@ +import fs from 'node:fs'; import path from 'node:path'; -import { globSync } from 'glob'; export default findup; @@ -11,13 +11,13 @@ function findup (patterns, options, fn) { var lastpath; var file; - options = Object.create(options); - options.maxDepth = 1; - options.cwd = path.resolve(options.cwd); + // Node's fs.globSync has no `nocase` option. Callers pass literal file + // names, so matching follows the file system's own case sensitivity. + options = { cwd: path.resolve(options.cwd) }; do { file = patterns.filter(function (pattern) { - var configPath = globSync(pattern, options)[0]; + var configPath = fs.globSync(pattern, options)[0]; if (configPath) { return fn(path.join(options.cwd, configPath));