Skip to content

Commit 4b1c73b

Browse files
committed
docs: add changesets for releasing
1 parent d108e5e commit 4b1c73b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.changeset/poor-dolls-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-import-x": patch
3+
---
4+
5+
fix: pnp issue when used in a monorepo

src/utils/resolve.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ export function fileExistsWithCaseSync(
7878
const filenames = fs.readdirSync(dir)
7979
result = filenames.includes(parsedPath.base)
8080
? fileExistsWithCaseSync(dir, cacheSettings, strict, false)
81-
: !leaf
81+
: !leaf &&
8282
// We tolerate case-insensitive matches if there are no case-insensitive matches.
8383
// It'll fail anyway on the leaf node if the file truly doesn't exist (if it doesn't
8484
// fail it's that we're probably working with a virtual in-memory filesystem).
85-
? filenames.findIndex(p => p.toLowerCase() === parsedPath.base) === -1
86-
: false
85+
!filenames.some(p => p.toLowerCase() === parsedPath.base.toLowerCase())
8786
}
8887
fileExistsCache.set(filepath, result)
8988
return result

test/fixtures/yarn-pnp/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import pnp from 'pnpapi'
22

33
import add from 'epix-oxc/add'
44

5-
import add2 from './__virtual__/whatever-123/0/add.js';
5+
import add2 from './__virtual__/whatever-123/0/add.js'
66

77
console.log(add)
88
console.log(add2)

0 commit comments

Comments
 (0)