Skip to content

Conversation

ematipico
Copy link
Member

Changes

This refactors the code by improving the way the cloudflare adapter (and any adapter in the future) and retrieve the BaseApp module.

It creates a astro/app/entrypoint specifier that exposes the new function getApp. This function is responsible for returning an SSR-compatible app based on the dev parameter.

I took the opportunity to rename the virtual modules using the agreed naming convention, which is virtual:astro:<FEATURE>. I didn't rename the astro actions because it has already been done in another branch.

I also updated the cloudflare dependencies. I didn't update to the latest because some deps were released less than three days ago.

Testing

This refactor was done during TBD, and we all verified that it works.

Docs

N/A

Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: a1b6f16

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 pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Oct 17, 2025
@florian-lefebvre
Copy link
Member

I wonder if the entrypoint should be a virtual module instead, given it loads virtual modules. Wdyt? Eg. import { getApp } from 'astro:adapter'

@ematipico ematipico force-pushed the refactor/improve-entrypoint-dx branch from a968f03 to 1ded870 Compare October 20, 2025 14:32
@ematipico
Copy link
Member Author

I rebased the code on top of next and I had to change some code around.

The specifier astro/assets/utils exported some code that used Node.js, so I had to break down the code and move the Node.js specific functions inside a new specifier astro/assets/node. I updated the downstream packages that were using those functions.

Please let me know if you have a better idea for how to export those functions (different specifiers, different names).

@ematipico ematipico merged commit f6b0a73 into feat/environment-api Oct 20, 2025
3 checks passed
@ematipico ematipico deleted the refactor/improve-entrypoint-dx branch October 20, 2025 14:53
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) pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants