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

Set transform to literal mode #939

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Jan 11, 2024

Changes

  • Updates transform to use the "literal" mode that already powers the AST and TSX outputs.
  • Turns out our parser could handle this use case, we just didn't flip the flag to make it do so.
  • Found a few other issues while fixing this, including tests that had encoded the incorrect behavior.
  • Closes 🐛 BUG: <body> tag gets removed when it is a child of a component #935. Closes PLT-1381.

Testing

Added new test for: Printer (JS), Printer (AST), Transform, Wasm output.
Existing tests should pass.
Updated old tests that relied on the previous behavior.

Docs

This is a bug fix

Copy link

changeset-bot bot commented Jan 11, 2024

🦋 Changeset detected

Latest commit: 2974e55

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

@natemoo-re
Copy link
Member Author

!preview literal

Copy link
Contributor

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

@natemoo-re natemoo-re marked this pull request as draft January 11, 2024 22:23
@matthewp matthewp marked this pull request as ready for review March 29, 2024 13:52
@matthewp
Copy link
Contributor

!preview literal

Copy link
Contributor

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

@matthewp matthewp marked this pull request as draft March 29, 2024 14:13
@matthewp
Copy link
Contributor

Tested against core and this is breaking a bunch of tests there: withastro/astro#10606

@MoustaphaDev
Copy link
Member

Yeah I believe it was because of the snapshot release having issues previously (which you pushed a fix for), tests passed locally for me IIRC, not sure though, been a little while 😀

@Fryuni
Copy link
Member

Fryuni commented Oct 3, 2024

It's spooky season so let's perform some necromancy and revive this change.

I'm having to work around the head bug in one of my integrations. Is there some blocker here besides the failing tests on core in that previous run?

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.

🐛 BUG: <body> tag gets removed when it is a child of a component
4 participants