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

Rename schema file to data.schema.json and publish it #1348

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

foolip
Copy link
Collaborator

@foolip foolip commented Jul 10, 2024

This will include the schema in the NPM package. The idea is to also
publish it with GitHub releases.

@foolip foolip requested a review from ddbeck July 10, 2024 10:14
@foolip
Copy link
Collaborator Author

foolip commented Jul 10, 2024

The idea is that this would help with #715. We can publish web-features.schema.json in both the NPM package and the GitHub release. The name of the data files are different (index.json vs. data.json) so matching either of those names would still leave a mismatch in the other place.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Ah, so the end-goal here is to export this on the package? import { schema } from "web-features"? In any case, this is fine.

@foolip
Copy link
Collaborator Author

foolip commented Jul 10, 2024

Ah, so the end-goal here is to export this on the package? import { schema } from "web-features"? In any case, this is fine.

This is for @jcscottiii who is using GitHub releases for webstatus.dev, so the goal is to add a file alongside data.json in the GitHub releases. A change in the schema would be a strong clue that something needs updating.

@foolip
Copy link
Collaborator Author

foolip commented Jul 19, 2024

I've sent #1470, and if we do that I think we should call this data.schema.json instead.

@foolip foolip changed the title Rename schema file to web-features.schema.json Rename schema file to data.schema.json Jul 19, 2024
@foolip foolip changed the title Rename schema file to data.schema.json Rename schema file to data.schema.json and publish it Jul 19, 2024
@foolip foolip requested a review from ddbeck July 19, 2024 14:48
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

It'd be nice to update packages/web-features/README.md with an example import statement for this, but I won't block on it. One minor suggestion in a line comment.

This will include the schema in the NPM package. The idea is to also
publish it with GitHub releases.

Co-authored-by: Daniel D. Beck <[email protected]>
@foolip
Copy link
Collaborator Author

foolip commented Jul 19, 2024

I've documented the import as import schema from "web-features/data.schema.json" with { type: "json" } and will merge this now.

@foolip foolip merged commit 4f8bfe8 into web-platform-dx:main Jul 19, 2024
3 checks passed
@foolip foolip deleted the rename-schema branch July 19, 2024 15:49
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.

2 participants