Skip to content

Be resilient to certain missing fields in metadata.json #136

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

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

Wyverald
Copy link
Collaborator

@Wyverald Wyverald commented Jan 22, 2024

Including yanked_versions and maintainers

Fixes #134

@Wyverald Wyverald changed the title Be resilient to missing yanked_versions in metadata.json Be resilient to certain missing fields in metadata.json Jan 22, 2024
@Wyverald Wyverald requested review from hobofan and alexeagle January 22, 2024 19:36
@@ -17,14 +17,14 @@ export const BUILDOZER_BIN = path.join(process.cwd(), 'bin', 'buildozer')

export interface Metadata {
homepage?: string
maintainers: Array<{
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we could consider doing the opposite. We already have a schema validator in the bcr that checks all module metadata is conformant.

(and this Metadata schema ought to be imported from that JSON schema so we know the two repos agree on required fields, etc)

WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure -- I just have no idea how to do any of that :)

I suggest we submit this PR first to make sure we have an updated website build, and then worry about finding engineering time for your suggestion.

@hobofan hobofan merged commit 3a4bb25 into main Jan 23, 2024
@hobofan hobofan deleted the Wyverald-patch-1 branch January 23, 2024 08:37
@hobofan
Copy link
Member

hobofan commented Jan 23, 2024

I open up an issue to use the upstream schema as the basis for our types, to prevent format reading mistakes in the future: #137

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.

missing yanked_versions field in metadata.json caused a TypeError
3 participants