Skip to content
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

fix(assets): Remove TLA by making compiledContent async #11782

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Aug 19, 2024

Changes

This makes compiledContent() async so that we can avoid the top level await in our Markdown modules. This fixes many issues regarding bundling image services where due to a Rollup bug (rollup/rollup#4708), Node would suddenly exit with no error messages

Testing

Tests should pass!

Docs

Will do!

Copy link

changeset-bot bot commented Aug 19, 2024

🦋 Changeset detected

Latest commit: c0185fa

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 pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Aug 19, 2024
@Princesseuh Princesseuh changed the title fix(cli): hardcoded supported Node.js version (#10742) fix(assets): Remove TLA by making compiledContent async Aug 19, 2024
@Princesseuh Princesseuh marked this pull request as ready for review August 20, 2024 10:52
@github-actions github-actions bot added the semver: major Change triggers a `major` release label Aug 20, 2024
Copy link
Contributor

@github-actions github-actions bot left a 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 major changeset. A reviewer will merge this at the next release if approved.

@sarah11918
Copy link
Member

Thanks @Princesseuh - just checking this is PLT-1323?

@Princesseuh
Copy link
Member Author

Thanks @Princesseuh - just checking this is PLT-1323?

It is, yes

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

I was also wondering if it's worth caching the html, but maybe it's not common to do something like that.

@Princesseuh Princesseuh merged commit 9a2aaa0 into next Aug 20, 2024
14 checks passed
@Princesseuh Princesseuh deleted the fix/tla-assets branch August 20, 2024 13:52
ematipico pushed a commit that referenced this pull request Aug 21, 2024
* fix(assets): Remove TLA by making compiledContent async

* fix: actually use the functions I just added lol

* chore: changeset
@princemuel
Copy link

princemuel commented Aug 23, 2024

How do we fix this in the v4? I'm on Astro v4.14.5 w/ Vercel serverless and getting the error

.vercel/output/_functions/chunks/how-to-update-dependencies_SGjbVBJN.mjs:62:16:
62 │ const html = await updateImageReferences("

Updating the dependencies of a pr...
╵ ~~~~~

Top-level await is not available in the configured target environment ("es2020")

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) pr: docs A PR that includes documentation for review semver: major Change triggers a `major` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants