Skip to content

Commit

Permalink
chore: update compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Jul 16, 2024
1 parent 6d917b2 commit 7282bcb
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-games-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'prettier-plugin-astro': patch
---

Fixes an issue where style and script tags would sometimes get moved to other tags
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"release": "pnpm build && changeset publish"
},
"dependencies": {
"@astrojs/compiler": "^1.5.5",
"@astrojs/compiler": "^2.9.1",
"prettier": "^3.0.0",
"sass-formatter": "^0.7.6"
},
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<html lang="en"><head><BaseHead /></head></html>
<style>@use "../styles/global.scss";</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<html lang="en"><head><BaseHead /></head></html>
<style>
@use "../styles/global.scss";
</style>
6 changes: 6 additions & 0 deletions test/tests/styles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ test(
'styles/with-styles-and-body-tag'
);

test(
'Can format a basic Astro file with styles and a body tag II',
files,
'styles/with-styles-and-body-tag-complex'
);

test('Can format .less styles', files, 'styles/with-less');

test('does not format unknown CSS languages', files, 'styles/with-unknown');

0 comments on commit 7282bcb

Please sign in to comment.