Skip to content

refactor: App to extends the new BaseApp#14213

Merged
ematipico merged 11 commits intofeat/environment-apifrom
env-api/dev-app
Aug 22, 2025
Merged

refactor: App to extends the new BaseApp#14213
ematipico merged 11 commits intofeat/environment-apifrom
env-api/dev-app

Conversation

@ematipico
Copy link
Copy Markdown
Member

@ematipico ematipico commented Aug 12, 2025

Changes

This PR creates a DevApp class that extends from BaseApp

The workflow is mostly the same as it is now, however, for simplicity, the DevApp calls the function handleRequest and then handleRoute instead of BaseApp.render.

handleRequest and handleRoute are the same of the two functions handleRequest and handleRoute we have nowadays. I tweaked a bit the types and information passed to make them a bit more compatible with what we have inside BaseApp.

We now use renderError to render an error page; however, the DevApp rewrites its logic based on what we have today.

Unfortunately, this refactor breaks the AstroSession tests 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

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 12, 2025

⚠️ No Changeset found

Latest commit: 2324967

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 12, 2025
@ematipico ematipico marked this pull request as ready for review August 21, 2025 12:51
@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Aug 21, 2025
@github-actions github-actions bot removed the pkg: integration Related to any renderer integration (scope) label Aug 22, 2025
@ematipico ematipico merged commit 10dd2dc into feat/environment-api Aug 22, 2025
12 of 14 checks passed
@ematipico ematipico deleted the env-api/dev-app branch August 22, 2025 10:13
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants