-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: compute getPkgName only when used #4729
Conversation
The other solution throws an error https://github.com/vitejs/vite/pull/4726/files#diff-aa53520bfd53e6c24220c44494457cc66370fd2bee513c15f9be7eb537a363e7R644 I personally like your solution therefore more, cause it does not throw an error, but do stuff silently 🚀/🤔 Edit: Damn 🙁 Tests failing 😢 @vwkd |
Now it also throws an error 😢 So it is kinda the same as the other PR, and I don't prefer this PR instead of the other PR 🤷 |
@Shinigami92 Thanks, I think I know why the CI failed. It's because I updated the tests and I hope the CI now passes. It's difficult for me to test locally, because I see many unrelated failures that I don't see on the CI. EDIT: Also added two new tests for this bug. |
I know you pain 😢 |
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.
🎉
Description
Fixes #4698.
This computes
getPkgName
only when used within the OR operation, allowing for no package name if alibOptions.fileName
is provided due to short circuiting. The check forlibOptions
isn't included anymore, because it's already present as the condition for whenresolveLibFilename
is called.I'm unsure how to include tests as I'm unfamiliar with such a big project.EDIT: Oh, I saw #4726 too late! Feel free to close this then.EDIT 2: Thanks to @OneNail for the inspiration of the error message.
EDIT 3: I added tests for the cases covered by this change.
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).