compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Set `transform` to literal mode

Open natemoo-re opened this issue 2 years ago • 8 comments

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 #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

natemoo-re avatar Jan 11 '24 18:01 natemoo-re

🦋 Changeset detected

Latest commit: 2974e55b20f85558728f5f0198479d076ebd1fcc

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

changeset-bot[bot] avatar Jan 11 '24 18:01 changeset-bot[bot]

!preview literal

natemoo-re avatar Jan 11 '24 18:01 natemoo-re

 > [email protected] 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/[email protected] 🦋 Creating git tag... 🦋 New tag: @astrojs/[email protected]

github-actions[bot] avatar Jan 11 '24 18:01 github-actions[bot]

!preview literal

matthewp avatar Mar 29 '24 13:03 matthewp

 > [email protected] 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/[email protected] 🦋 Creating git tag... 🦋 New tag: @astrojs/[email protected]

github-actions[bot] avatar Mar 29 '24 13:03 github-actions[bot]

Tested against core and this is breaking a bunch of tests there: https://github.com/withastro/astro/pull/10606

matthewp avatar Mar 29 '24 14:03 matthewp

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 😀

MoustaphaDev avatar Apr 02 '24 21:04 MoustaphaDev