-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(env): add schema, types and envField #10805
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be under experimental.
@matthewp FYI this PR isn't against We're using stacked PRs to progressively work on the feature. |
Moreover, I checked and everything is under |
The configuration is already under the experimental flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
* feat(env): add schema, types and envField (#10805) * feat(env): add validators (#10827) * feat(env): add vite plugin (#10829) * feat(env): client/public variables (#10848) Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * feat(env): server/public variables (#10881) Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * feat(env): server/secret variables (#10954) Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * fix: import * fix: test * feat: work on jsdoc * feat: more jsdoc * chore: remove todo * feat: fix test error and write changeset * feat: update config reference * feat: apply recommendations from review * feat: rework getEnv/setGetEnv * chore: move tests * fix: rename * fix: dev mode * chore: improve error * feat: add overrideProcessEnv helper * fix: make eslint happy * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * feat: fix build and address reviews * fix: container api * fix: tests * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts * chore: update changeset * feat: address reviews * feat: address Ema's reviews * Update .changeset/poor-berries-occur.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Changes
AstroConfigSchema
AstroUserConfig
envField
Related RFC section: https://github.com/withastro/roadmap/blob/feat/astro-env-rfc/proposals/0046-astro-env.md#astro-config
Testing
Updates a unit test to test custom zod errors
Docs
N/A