Commit d541f00
feat: improve PackagePathNotExported error message with condition names
Improves the error message to match enhanced-resolve behavior from
commit f1bc1c2, providing better developer experience when debugging
export resolution failures.
Changes:
- Updated `ResolveError::PackagePathNotExported` to include condition names
- Added `ConditionNames` type with custom Display formatting
- Error message now shows which conditions were checked
Before:
Package subpath './foo' is not defined by "exports" in /path/to/package.json
After:
"./foo" is not exported under the conditions ["node", "import"] from package /path/to (see exports field in /path/to/package.json)
Fixes: Cross-reference with enhanced-resolve #460
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 94406bd commit d541f00
3 files changed
+50
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
204 | 234 | | |
205 | 235 | | |
206 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1718 | 1718 | | |
1719 | 1719 | | |
1720 | 1720 | | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1725 | 1727 | | |
1726 | 1728 | | |
1727 | 1729 | | |
| |||
1977 | 1979 | | |
1978 | 1980 | | |
1979 | 1981 | | |
1980 | | - | |
1981 | | - | |
1982 | | - | |
1983 | | - | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
1984 | 1988 | | |
1985 | 1989 | | |
1986 | 1990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
2560 | 2560 | | |
2561 | 2561 | | |
2562 | 2562 | | |
2563 | | - | |
| 2563 | + | |
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
| |||
0 commit comments