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

Validate environment variables using Zod #204

Closed
1 task done
tyler-dane opened this issue Dec 26, 2024 · 0 comments · Fixed by #205
Closed
1 task done

Validate environment variables using Zod #204

tyler-dane opened this issue Dec 26, 2024 · 0 comments · Fixed by #205
Assignees

Comments

@tyler-dane
Copy link
Contributor

tyler-dane commented Dec 26, 2024

Feature Description

As a contributor, I want to see any issues with my env file in the console during startup, so that I can quickly understand and fix it. If there are any critical errors during runtime, I want to see the error. If there are any optional features that I opted out of, I want to see a warning in the console but still be able to use the app.

Additional Context

We're currently doing this validation by-hand in env.constants by checking the types of the values in env.process. Using a dedicated validation library like zod will let us do this in a more straightforward way. It'll also make our error messages more clear

Acceptance Criteria

  • update compass docs with new env info
@tyler-dane tyler-dane self-assigned this Dec 26, 2024
@tyler-dane tyler-dane moved this to In progress in 🏗 Compass Roadmap Dec 26, 2024
@tyler-dane tyler-dane linked a pull request Dec 28, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In progress to Done in 🏗 Compass Roadmap Dec 28, 2024
@tyler-dane tyler-dane changed the title Use zod for schema validation Use zod for environment variable validation Jan 19, 2025
@tyler-dane tyler-dane changed the title Use zod for environment variable validation Validate environment variables using zod Jan 19, 2025
@tyler-dane tyler-dane changed the title Validate environment variables using zod Validate environment variables using Zod Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant