From 7282bcbe327e552e793b03904fbf858ec10ff8b7 Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:52:16 +0200 Subject: [PATCH] chore: update compiler --- .changeset/eight-games-explode.md | 5 +++++ package.json | 2 +- pnpm-lock.yaml | 8 ++++---- .../styles/with-styles-and-body-tag-complex/input.astro | 2 ++ .../styles/with-styles-and-body-tag-complex/output.astro | 4 ++++ test/tests/styles.test.ts | 6 ++++++ 6 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 .changeset/eight-games-explode.md create mode 100644 test/fixtures/styles/with-styles-and-body-tag-complex/input.astro create mode 100644 test/fixtures/styles/with-styles-and-body-tag-complex/output.astro diff --git a/.changeset/eight-games-explode.md b/.changeset/eight-games-explode.md new file mode 100644 index 0000000..01db038 --- /dev/null +++ b/.changeset/eight-games-explode.md @@ -0,0 +1,5 @@ +--- +'prettier-plugin-astro': patch +--- + +Fixes an issue where style and script tags would sometimes get moved to other tags diff --git a/package.json b/package.json index b65824a..8305c5e 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5eaef5b..0884bd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@astrojs/compiler': - specifier: ^1.5.5 - version: 1.5.5 + specifier: ^2.9.1 + version: 2.9.1 prettier: specifier: ^3.0.0 version: 3.0.0 @@ -72,8 +72,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@astrojs/compiler@1.5.5: - resolution: {integrity: sha512-8LEj9nUr5+92ms8/ZUyajcLYqurhXHTNMERctsHZ1JyRrnjseheUHCM+MC34bMP0uOou2JXJFWVJudDTTe4S/A==} + /@astrojs/compiler@2.9.1: + resolution: {integrity: sha512-s8Ge2lWHx/s3kl4UoerjL/iPtwdtogNM/BLOaGCwQA6crMOVYpphy5wUkYlKyuh8GAeGYH/5haLAFBsgNy9AQQ==} dev: false /@babel/code-frame@7.22.5: diff --git a/test/fixtures/styles/with-styles-and-body-tag-complex/input.astro b/test/fixtures/styles/with-styles-and-body-tag-complex/input.astro new file mode 100644 index 0000000..15870ae --- /dev/null +++ b/test/fixtures/styles/with-styles-and-body-tag-complex/input.astro @@ -0,0 +1,2 @@ +