Skip to content

Commit

Permalink
Fix named exports check crash when resolution is JS-only
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Dec 6, 2024
1 parent 953e617 commit c439f80
Show file tree
Hide file tree
Showing 3 changed files with 790 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/internal/checks/namedExports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineCheck({
name: "NamedExports",
dependencies: ({ entrypoints, subpath, resolutionKind, programInfo }) => {
const entrypoint = entrypoints[subpath].resolutions[resolutionKind];
const typesFileName = entrypoint.resolution?.fileName;
const typesFileName = entrypoint.resolution?.isTypeScript && entrypoint.resolution.fileName;
const resolutionOption = getResolutionOption(resolutionKind);
const typesModuleKind = typesFileName ? programInfo[resolutionOption].moduleKinds?.[typesFileName] : undefined;
const implementationFileName = entrypoint.implementationResolution?.fileName;
Expand Down
Binary file added packages/core/test/fixtures/[email protected]
Binary file not shown.
Loading

0 comments on commit c439f80

Please sign in to comment.