Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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