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: filter logic #9653

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

fix: filter logic #9653

wants to merge 1 commit into from

Conversation

dinglindong
Copy link

Description

const availableBinaries = [
'turbo-darwin-64/bin/turbo',
'turbo-darwin-arm64/bin/turbo',
'turbo-linux-64/bin/turbo',
'turbo-linux-arm64/bin/turbo',
'turbo-windows-64/bin/turbo.exe',
'turbo-windows-arm64/bin/turbo.exe'
];
const correctBinary = 'turbo-darwin-arm64/bin/turbo';
const definitelyWrongBinaries = availableBinaries.filter(binary => binary !== correctBinary || binary !== correctBinary);

filter function internal condition or after meaningless, The result of definitelyWrongBinaries

const availableBinaries = [
'turbo-darwin-64/bin/turbo',
'turbo-linux-64/bin/turbo',
'turbo-linux-arm64/bin/turbo',
'turbo-windows-64/bin/turbo.exe',
'turbo-windows-arm64/bin/turbo.exe'
];

In fact 'turbo-darwin-64/bin/turbo' should also go

Testing Instructions

const correctBinary = 'turbo-darwin-arm64/bin/turbo';
const alternateBinary = 'turbo-darwin-64/bin/turbo'
const definitelyWrongBinaries = availableBinaries.filter(binary => binary !== correctBinary && binary !== alternateBinary);

definitelyWrongBinaries result for others

@dinglindong dinglindong requested a review from a team as a code owner December 27, 2024 02:51
@turbo-orchestrator turbo-orchestrator bot added the needs: triage New issues get this label. Remove it after triage label Dec 27, 2024
Copy link

vercel bot commented Dec 27, 2024

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

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 2:52am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 2:52am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 2:52am
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 2:52am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 2:52am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 2:52am

Copy link

vercel bot commented Dec 27, 2024

@dinglindong is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant