Skip to content

Commit 9e21791

Browse files
author
Pelle Wessman
committed
Update globby to 13.1.3
Makes workaround redundant for bug described in sindresorhus/globby#242
1 parent c9b03ea commit 9e21791

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

lib/utils/path-resolve.js

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,17 @@ const GLOB_IGNORE = [
3939
* @throws {InputError}
4040
*/
4141
export async function getPackageFiles (cwd, inputPaths, config, debugLog) {
42-
let hasPlainDot = false
43-
44-
// TODO [globby@>13.1.2]: The bug that requires this workaround has probably been fixed now: https://github.com/sindresorhus/globby/pull/242
45-
const filteredInputPaths = inputPaths.filter(item => {
46-
if (item === '.') {
47-
hasPlainDot = true
48-
return false
49-
}
50-
return true
42+
const entries = await globby(inputPaths, {
43+
absolute: true,
44+
cwd,
45+
expandDirectories: false,
46+
gitignore: true,
47+
ignore: [...GLOB_IGNORE],
48+
markDirectories: true,
49+
onlyFiles: false,
50+
unique: true,
5151
})
5252

53-
const entries = [
54-
...(hasPlainDot ? [cwd + '/'] : []),
55-
...(await globby(filteredInputPaths, {
56-
absolute: true,
57-
cwd,
58-
expandDirectories: false,
59-
gitignore: true,
60-
ignore: [...GLOB_IGNORE],
61-
markDirectories: true,
62-
onlyFiles: false,
63-
unique: true,
64-
}))
65-
]
66-
6753
debugLog(`Globbed resolved ${inputPaths.length} paths to ${entries.length} paths:`, entries)
6854

6955
const packageFiles = await mapGlobResultToFiles(entries)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@socketsecurity/sdk": "^0.4.0",
7979
"ajv": "^8.11.2",
8080
"chalk": "^5.1.2",
81-
"globby": "^13.1.2",
81+
"globby": "^13.1.3",
8282
"hpagent": "^1.2.0",
8383
"ignore": "^5.2.1",
8484
"ignore-by-default": "^2.1.0",

0 commit comments

Comments
 (0)