Skip to content

Commit

Permalink
Update dependencies, update compiler version (#293)
Browse files Browse the repository at this point in the history
* Update dependencies, update compiler version

* Add changeset

* Update deps

* Re-enable disabled test
  • Loading branch information
Princesseuh authored Oct 17, 2022
1 parent 163ffec commit 17af6ef
Show file tree
Hide file tree
Showing 6 changed files with 445 additions and 424 deletions.
6 changes: 6 additions & 0 deletions .changeset/pretty-jars-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'prettier-plugin-astro': patch
---

Fix style tags getting moved inside body tags
Fix fragments with expressions inside being moved to before the expressions in certain cases
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@
"release": "yarn build && changeset publish"
},
"dependencies": {
"@astrojs/compiler": "^0.23.4",
"@astrojs/compiler": "0.27.2",
"prettier": "^2.7.1",
"sass-formatter": "^0.7.5",
"synckit": "^0.7.0"
"synckit": "^0.8.4"
},
"devDependencies": {
"@changesets/cli": "^2.24.3",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-typescript": "^8.4.0",
"@types/node": "^18.7.13",
"@types/prettier": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^5.35.1",
"@typescript-eslint/parser": "^5.35.1",
"@vitest/ui": "^0.22.1",
"eslint": "^8.23.0",
"@changesets/cli": "^2.25.0",
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-typescript": "^9.0.1",
"@types/node": "^18.11.0",
"@types/prettier": "^2.7.1",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@vitest/ui": "^0.24.3",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier-doc": "^1.1.0",
"rollup": "^2.78.1",
"rollup": "^3.2.2",
"tslib": "^2.4.0",
"typescript": "^4.8.2",
"vitest": "^0.22.1"
"typescript": "^4.8.4",
"vitest": "^0.24.3"
}
}
File renamed without changes.
22 changes: 11 additions & 11 deletions test/fixtures/markdown/embedded-in-markdown/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ For best results, you should only have one `<style>` tag per-Astro component. Th

```astro
<!-- Astro Component CSS example -->
<div class="circle"></div>
<style>
.circle {
background-color: red;
Expand All @@ -49,6 +46,7 @@ For best results, you should only have one `<style>` tag per-Astro component. Th
width: 50px;
}
</style>
<div class="circle"></div>
```

```astro
Expand All @@ -59,7 +57,7 @@ For best results, you should only have one `<style>` tag per-Astro component. Th
...;
</style>
</head>
<body> ... </body>
<body> ...</body>
</html>
```

Expand Down Expand Up @@ -274,13 +272,15 @@ const items = ["Dog", "Cat", "Platipus"];
---
<ul>
{items.map((item) => (
<>
<li>Red {item}</li>
<li>Blue {item}</li>
<li>Green {item}</li>
</>
))}
{
items.map((item) => (
<>
<li>Red {item}</li>
<li>Blue {item}</li>
<li>Green {item}</li>
</>
))
}
</ul>
```

Expand Down
7 changes: 2 additions & 5 deletions test/tests/markdown.ts → test/tests/markdown.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
// This file can't have the `.test.ts` extension otherwise Vitest will try to run it despite being empty which cause an error

import { test } from '../test-utils';

const files = import.meta.glob('/test/fixtures/markdown/*/*', {
eager: true,
as: 'raw',
});

// This test is currently disabled because a bug moves a style tag when it shouldn't
/* test(
test(
'can format an Astro file containing an Astro file embedded in a codeblock',
files,
'markdown/embedded-in-markdown',
true
); */
);
Loading

0 comments on commit 17af6ef

Please sign in to comment.