Skip to content

fix: schema validation errors disguised as warnings - #1640

Merged
thymikee merged 3 commits into
mainfrom
fix/warning-errors
Jul 8, 2022
Merged

thymikee merged 3 commits into
mainfrom
fix/warning-errors

Conversation

@thymikee

@thymikee thymikee commented Jul 7, 2022

Copy link
Copy Markdown
Member

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 Esemesek and grabbou as code owners July 7, 2022 16:52
@thymikee
thymikee requested a review from kelset July 7, 2022 16:53
@thymikee

thymikee commented Jul 7, 2022

Copy link
Copy Markdown
Member Author

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