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

feat: Add zod schemas for CI validation #479

Merged
merged 2 commits into from
Nov 12, 2023
Merged

feat: Add zod schemas for CI validation #479

merged 2 commits into from
Nov 12, 2023

Conversation

lachlancollins
Copy link
Collaborator

This adds the main feature of #427, which is Zod validation of the JSON files during linting.

Note that the npm field is currently optional; this is because svelte-layout-resizable and SvelteStore are missing this field. This can be corrected in a subsequent PR.

Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for sveltesociety-preview ready!

Name Link
🔨 Latest commit f97d23f
🔍 Latest deploy log https://app.netlify.com/sites/sveltesociety-preview/deploys/65495179a3f65b0008cf0fc9
😎 Deploy Preview https://deploy-preview-479--sveltesociety-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lachlancollins
Copy link
Collaborator Author

@MacFJA would you be able to have a look at this?

Copy link
Collaborator

@MacFJA MacFJA left a comment

Choose a reason for hiding this comment

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

If we are using Zod, let's go full out with it.

If it can help to prevent new categories to be wrongly added (it's not like new category can't be added, but it had to have some sense), or the NPM field not to be a URL, I'm for.

src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
src/lib/schemas.js Outdated Show resolved Hide resolved
@lachlancollins
Copy link
Collaborator Author

@MacFJA I've applied these changes!

@lachlancollins
Copy link
Collaborator Author

Hi @MacFJA and @benmccann, would either of you be able to review this? Thanks!

@lachlancollins
Copy link
Collaborator Author

Hey @MacFJA , thanks for reviewing this! I was wondering if there's anything else I need to do before we can merge it? I appreciate your help!

@lachlancollins
Copy link
Collaborator Author

@MacFJA sorry to tag you again, just checking if this was ready to merge? I have another PR lined up that depends on this :)

@MacFJA
Copy link
Collaborator

MacFJA commented Nov 12, 2023

@MacFJA sorry to tag you again, just checking if this was ready to merge? I have another PR lined up that depends on this :)

Don't worry.


As no-one have voiced anything against this PR, I will merge it

@MacFJA MacFJA merged commit 71d1b2e into svelte-society:main Nov 12, 2023
4 checks passed
@lachlancollins lachlancollins deleted the json-validation branch November 12, 2023 12:00
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