-
Notifications
You must be signed in to change notification settings - Fork 1
add pnp error handling and test #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pnp error handling and test #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this! I have a few comments but the PR overall looks good to me! 🔥
internal/module/resolver.go
Outdated
| if ok { | ||
| typeRoots = pnpTypeRoots | ||
| } | ||
| typeRoots, fromConfig = pnpApi.AppendPnpTypeRoots(typeRoots, compilerOptions.GetBaseDirFromOptions(r.host.GetCurrentDirectory()), false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry if I wasn't clear, but you need to pass the fromConfig as the third argument too:
| typeRoots, fromConfig = pnpApi.AppendPnpTypeRoots(typeRoots, compilerOptions.GetBaseDirFromOptions(r.host.GetCurrentDirectory()), false) | |
| typeRoots, fromConfig = pnpApi.AppendPnpTypeRoots(typeRoots, compilerOptions.GetBaseDirFromOptions(r.host.GetCurrentDirectory()), fromConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time to check it! abbd1c3
I’ve added tests and standardized the error messages to align with the conventions in TypeScript and Go.
I also made some minor implementation updates, which I’ll explain in the comments.