refactor: App to extends the new BaseApp#14213
Merged
ematipico merged 11 commits intofeat/environment-apifrom Aug 22, 2025
Merged
refactor: App to extends the new BaseApp#14213ematipico merged 11 commits intofeat/environment-apifrom
ematipico merged 11 commits intofeat/environment-apifrom
Conversation
|
ascorbic
reviewed
Aug 22, 2025
ematipico
added a commit
that referenced
this pull request
Sep 2, 2025
ematipico
added a commit
that referenced
this pull request
Sep 3, 2025
ematipico
added a commit
that referenced
this pull request
Sep 3, 2025
* refactor: use environments to load modules (#14191) * refactor: make `App` more extensible using `BaseApp` (#14197) * refactor: App to extends the new BaseApp (#14213) * refactor: manifest as virtual module (#14298) * refactor: create `generate` when needed * fix type * remove type * fix types * fix breakage of code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR creates a
DevAppclass that extends fromBaseAppThe workflow is mostly the same as it is now, however, for simplicity, the
DevAppcalls the functionhandleRequestand thenhandleRouteinstead ofBaseApp.render.handleRequestandhandleRouteare the same of the two functionshandleRequestandhandleRoutewe have nowadays. I tweaked a bit the types and information passed to make them a bit more compatible with what we have insideBaseApp.We now use
renderErrorto render an error page; however, theDevApprewrites its logic based on what we have today.Unfortunately, this refactor breaks the
AstroSessiontests in dev, and I don't know why because I'm not familiar with the code. As for now, I skipped the tests, and I will tackle them once Matt is back from PTO.I added a task as a reminder.
Testing
Current CI should stay green
Docs
N/A