-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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(astro): experimental astro:env #10974
Conversation
Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]>
🦋 Changeset detectedLatest commit: e8cbc6c The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
!preview astro-env |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
!preview astro-env |
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
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.
Approving for docs with this one update! 🥳
Nooooo wait! We have to do the changeset to match now! UNAPPROVE! lol
@@ -382,7 +382,7 @@ async function writeContentFiles({ | |||
let contentTypesStr = ''; | |||
let dataTypesStr = ''; | |||
|
|||
const collectionSchemasDir = new URL('./collections/', contentPaths.cacheDir); | |||
const collectionSchemasDir = new URL('./collections/', settings.dotAstroDir); |
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.
Why are these things changed?
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.
All codegen related features need to create files in .astro
. The path is not content specific so I extracted it to settings to be able to reuse it across content, actions and env. It will also be helpful when I get to work on withastro/roadmap#887
const numberValidator: ValueValidator = (input) => { | ||
const num = parseFloat(input ?? ''); | ||
return { | ||
valid: !isNaN(num), |
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.
Tested this implementation quite a bit and couldn't find a bug, good job!
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.
Some small nits, but this looks great!
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.
Made one small suggestion, but I think otherwise the docs pass my checks! Nicely done @florian-lefebvre !
If either @ematipico or @matthewp has suggestions or comments for the technical accuracy/completeness of the docs, feel free to comment! But from an editing standpoint, I'm happy with what's there!
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.
Looking great so far! 😁
Co-authored-by: Sarah Rainsberger <[email protected]>
…nto feat/astro-env
Changes
astro:env
. View RFC Astro Env roadmap#894What to review
I'm mostly looking for reviews on
astro:env/setup
: https://github.com/withastro/astro/pull/10974/files#diff-d08d0989a863f87bfceda052de858b8d03124b6bfbff8e084ffbef31240bb446, https://github.com/withastro/astro/pull/10974/files#diff-a95d41705ded14985c748b640b26f3226a7c37d714a8f2fe6171252a59e9941eR79-R81, https://github.com/withastro/astro/pull/10974/files#diff-f982c118ef9afa9c2d69b474b2e206e460b62068cccb0061a5b4eccfe81c708bAlso worth reviewing the adapters pr to see how it will be used for real.
Testing
Unit and integration tests
Docs
Added changeset and config reference