Skip to content
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(expo): pnpm+workspace build #28209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dearlordylord
Copy link
Contributor

@dearlordylord dearlordylord commented Oct 1, 2024

Current Behavior

build executors for expo crash when package manager pnpm and workspaces are used

Expected Behavior

no crashies

Related Issue(s)

#28208

Fixes #28208

FAQ

  • why not handle the undefined by the calling code instead

The less the calling code knows about inner workings, the better: in this case, doing this would add the implicit dependency on "pnpm and workspaces" to the calling code

  • but it's an empty function, my performance

We call it once per user interaction.

  • but still, it's an empty function

We return an empty array when there are no elements; we don't return undefined when the array is empty and array when array is non-empty. Hopefully so.

  • but,

The doc also says that this function returns a function.

@dearlordylord dearlordylord requested a review from a team as a code owner October 1, 2024 00:09
Copy link

vercel bot commented Oct 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 0:12am

@@ -114,7 +114,7 @@ function copyPackageJsonAndLock(
packageManager: PackageManager,
workspaceRoot: string,
projectRoot: string
) {
): () => void {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make not possible to forget again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expo: copyPackageJsonAndLock returns undefined instead of cleanup function in corner cases
2 participants