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

Add server island metadata #1008

Merged
merged 7 commits into from
Jul 16, 2024
Merged

Add server island metadata #1008

merged 7 commits into from
Jul 16, 2024

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Jun 10, 2024

Changes

  • Discovers server:defer directive usage, then links that back to the import statement like what is done with client: islands. This information is exported as part of the compile result, on the serverComponents field, to be used by Astro.

Testing

  • Since the only visible change is to the metadata, this is tested by adding a wasm test, to verify that the information is included and is correct.

Docs

N/A

Copy link

changeset-bot bot commented Jun 10, 2024

🦋 Changeset detected

Latest commit: 36c0339

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/compiler Minor

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

@matthewp
Copy link
Contributor Author

!preview server-islands

Copy link
Contributor

 > [email protected] release /home/runner/work/compiler/compiler > changeset publish "--tag" "next--server-islands" 🦋 warn ===============================IMPORTANT!=============================== 🦋 warn Packages will be released under the next--server-islands tag 🦋 warn ---------------------------------------------------------------------- 🦋 info npm info @astrojs/compiler 🦋 info @astrojs/compiler is being published because our local version (0.0.0-server-islands-20240610194904) has not been published on npm 🦋 info Publishing "@astrojs/compiler" at "0.0.0-server-islands-20240610194904" 🦋 success packages published successfully: 🦋 @astrojs/[email protected] 🦋 Creating git tag... 🦋 New tag: @astrojs/[email protected]

@matthewp
Copy link
Contributor Author

!preview server-islands

Copy link
Contributor

 > [email protected] release /home/runner/work/compiler/compiler > changeset publish "--tag" "next--server-islands" 🦋 warn ===============================IMPORTANT!=============================== 🦋 warn Packages will be released under the next--server-islands tag 🦋 warn ---------------------------------------------------------------------- 🦋 info npm info @astrojs/compiler 🦋 info @astrojs/compiler is being published because our local version (0.0.0-server-islands-20240619175952) has not been published on npm 🦋 info Publishing "@astrojs/compiler" at "0.0.0-server-islands-20240619175952" 🦋 success packages published successfully: 🦋 @astrojs/[email protected] 🦋 Creating git tag... 🦋 New tag: @astrojs/[email protected]

@matthewp
Copy link
Contributor Author

!preview server-islands

Copy link
Contributor

 > [email protected] release /home/runner/work/compiler/compiler > changeset publish "--tag" "next--server-islands" 🦋 warn ===============================IMPORTANT!=============================== 🦋 warn Packages will be released under the next--server-islands tag 🦋 warn ---------------------------------------------------------------------- 🦋 info npm info @astrojs/compiler 🦋 info @astrojs/compiler is being published because our local version (0.0.0-server-islands-20240620184241) has not been published on npm 🦋 info Publishing "@astrojs/compiler" at "0.0.0-server-islands-20240620184241" 🦋 success packages published successfully: 🦋 @astrojs/[email protected] 🦋 Creating git tag... 🦋 New tag: @astrojs/[email protected]

@matthewp matthewp marked this pull request as ready for review June 28, 2024 16:26
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Can you also create some snapshot tests in the go testing suite? It would be nice to have some safety against regressions

@matthewp
Copy link
Contributor Author

matthewp commented Jul 2, 2024

@ematipico this doesn't change the compiled output JS at all. It just adds the metadata that's only retrieved from the JS compiler API. That's why the tests are there.

Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

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

Code looks good to me!

@Princesseuh Princesseuh merged commit 9fb8d5d into main Jul 16, 2024
5 checks passed
@Princesseuh Princesseuh deleted the server-islands branch July 16, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants