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 @@ +