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

Allow buildTargets to be missing or empty if native components are provided #118

Merged
merged 1 commit into from Jun 11, 2019

Conversation

Hexxeh
Copy link
Contributor

@Hexxeh Hexxeh commented Jun 6, 2019

No description provided.

…ovided

Signed-off-by: Liam McLoughlin <lmcloughlin@fitbit.com>
@Hexxeh Hexxeh requested a review from a team June 6, 2019 16:19
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 71.193% when pulling 9278670 on bugfix/native-build-only into 3f34cfc on master.

@Hexxeh
Copy link
Contributor Author

Hexxeh commented Jun 6, 2019

Coverage decrease is in index.ts only, which needs a bunch of splitting up and a larger refactoring to make it testable.

@Hexxeh Hexxeh merged commit 410f772 into master Jun 11, 2019
@Hexxeh Hexxeh deleted the bugfix/native-build-only branch June 11, 2019 09:12
const diagnostics = constrainedSetDiagnostics({
actualValues: buildTargets,
knownValues: knownBuildTargets,
valueTypeNoun: 'build targets',
notFoundIsFatal: true,
});

if (buildTargets.length === 0) {
if (
(buildTargets === undefined || buildTargets.length === 0) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

i think that having buildTargets undefined as a valid option is in contrast with what our types are saying. We should change our typings too and adjust.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's only valid if there are native components, which is what this is checking for.

If it's undefined, the types are still correct, because the normalization function will default it to an empty array.

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.

None yet

4 participants