mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
fix(javascript): preserve trailing-slash exports uncertainty
Fixes #9998 Supersedes #10107 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
1 parent
f81cbd0c43
commit
3a25046b8c
3 files changed
+127
-2
No files matched your search
@@ -1862,8 +1862,12 @@ const selectPackageExport = (
|
||||
};
|
||||
declared = keys;
|
||||
if (hasSubpaths) {
|
||||
if (subpath.endsWith("/")) return { status: "unmatched", declared };
|
||||
if (!subpath.includes("*") && Object.hasOwn(value, subpath))
|
||||
// A trailing slash excludes exact keys, but can still match a wildcard.
|
||||
if (
|
||||
!subpath.endsWith("/") &&
|
||||
!subpath.includes("*") &&
|
||||
Object.hasOwn(value, subpath)
|
||||
)
|
||||
target = Reflect.get(value, subpath);
|
||||
else {
|
||||
pattern = selectPackageSubpathPattern(keys, subpath);
|
||||
|
||||
Reference in new issue
Block a user