Skip to content

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Sep 3, 2025

Changes

  • Refactor of core Astro to use the Vite environments API, primarily to enable dev mode in runtimes like workerd.

Testing

  • Many tests updated

Docs

@changeset-bot
Copy link

changeset-bot bot commented Sep 3, 2025

🦋 Changeset detected

Latest commit: 98144fb

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 3, 2025
@ematipico ematipico force-pushed the feat/environment-api branch from 15a3eab to c701fe4 Compare September 3, 2025 08:17
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 3, 2025

CodSpeed Performance Report

Merging #14306 will not alter performance

Comparing feat/environment-api (28b2f42) with main (f59581f)1

Summary

✅ 6 untouched

Footnotes

  1. No successful run was found on next (16bb9f0) during the generation of this report, so main (f59581f) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

* 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
ematipico and others added 8 commits September 8, 2025 10:23
* Use separate env to load content config

* Format
* feat(cloudflare): add Vite plugin

* Skip request handling when running in cloudflare

* Skip lots of plugins in non-runnable envs

* Use serialized-manifest

* Use separate env to load content config

* Format

* fix rebase

* fix type

* Remove overrides

* Remove trace

---------

Co-authored-by: Emanuele Stoppa <[email protected]>
@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Sep 9, 2025
…14345)

* refactor: dev app without settings and loader

* address comments

* chore: refactor to use proper dev pipeline

* revert changes

* chore: update lockfile

* conditionally propagate metadata

* revert exports
ascorbic and others added 7 commits September 15, 2025 14:34
* Add support for content layer in env API

* Lint

* Format
* Support CF Images binding

* Add support for content layer in env API

* Lint

* Format

* Use image binding in dev

---------

Co-authored-by: Samuel Macleod <[email protected]>
Co-authored-by: Alexander Niebuhr <[email protected]>
This gets framework components to render in workerd. SSR and client both
work.
Princesseuh and others added 2 commits December 1, 2025 15:32
* Fix astro:env tests in Cloudflare

This fixes astro:env tests and brings back .dev.vars support

* fix wrangler

* log parse errors of .dev.vars
@matthewp
Copy link
Contributor

matthewp commented Dec 1, 2025

@sarah11918 The changesets in this PR are ready to review, along with the upgrade guide docs which are here: withastro/docs#12809

Thanks!

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviews for astro major changesets, before GitHub dies on me!

Note: we decided that changelog entries for breaking changes would be minimal and link to the upgrade guide for all explanation of changes. So if there is anything contained here that you think needs to be said, it needs to find its way into the upgrade guide!

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest of the changesets reviewed with suggestions! 🙌

(Mostly, the integrations and adapters dont get their own upgrade guides, so we DO rely on changelogs for them. So, these are still hefty entries, and for majors with breaking change, we'll add a #### What should I do? section to make sure it's clear that there is something they might have to do.


The `createExports()` function has been replaced with a direct export pattern. If you're using a custom `entryPoint` in your Cloudflare adapter config, update your worker file from:

```ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity, can you add a title to this file (and the following)?

'@astrojs/cloudflare': minor
---

Adds support for `astro preview` command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one looks great!


to:

```ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same file title here as the previous example

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for changesets! If there happen to be any new error messages associated with this, let me know (I didn't immediately see any).

Otherwise, we're pretty close to getting the docs PR squared away and just letting you know that doesn't have to hold up this PR if it's helpful to get it off your plate!

The main thing we want to ensure is that any changesets here merge with correct links to the upgrade guide. Since we've already worked out those what those will be, we know the links for adding here, and that's good enough for me.

(The docs PR is close, just updating other pages in docs to match the changes, and doesn't need to merge before/with this PR since no one is actually relying on them for anything yet.)

@github-actions github-actions bot added pkg: react Related to React (scope) pkg: preact Related to Preact (scope) pkg: solid Related to Solid (scope) labels Dec 4, 2025
@sarah11918
Copy link
Member

Also noting that the Docs PR is now approved by me and by Armand! Anyone is welcome to give it a final look over for anything you spot last minute!

@ematipico ematipico dismissed github-actions[bot]’s stale review December 4, 2025 13:38

Ready to be merged. Fully approved!

@ematipico ematipico merged commit 141c4a2 into next Dec 4, 2025
40 of 41 checks passed
@ematipico ematipico deleted the feat/environment-api branch December 4, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: solid Related to Solid (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) semver: major Change triggers a `major` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants