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: schema validation errors disguised as warnings #1640

Merged
merged 3 commits into from
Jul 8, 2022

Conversation

thymikee
Copy link
Member

@thymikee thymikee commented Jul 7, 2022

Summary:

When Joi validates the schema, it will abort early and thus prevent us from constructing the rest of the configuration, which might be correct. In such case the CLI would emit a warning that configuration for a certain package was invalid. However what this warning wouldn't tell is that the library failed to autolink completely.

This PR changes the Joi validation to not abort early and make warnings what they really are, without preventing the schema object to be created.

This caused issues like this one: reactwg/react-native-releases#23

Test Plan:

Adjusted the wording of the warning:

image

@thymikee thymikee requested review from grabbou and Esemesek as code owners July 7, 2022 16:52
@thymikee thymikee requested a review from kelset July 7, 2022 16:53
@thymikee
Copy link
Member Author

thymikee commented Jul 7, 2022

Will work on unit tests tomorrow

@thymikee thymikee force-pushed the fix/warning-errors branch from 1eb7995 to 42f16ae Compare July 8, 2022 09:24
@thymikee thymikee merged commit 57b825b into main Jul 8, 2022
@thymikee thymikee deleted the fix/warning-errors branch July 8, 2022 10:40
thymikee added a commit that referenced this pull request Jul 8, 2022
* fix: schema validation errors disguised as warnings

* update lockfile

* change test accordintly to the change of behavior for skipping packages with invalid conifg
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.

1 participant