Skip to content

Commit 89d3cc6

Browse files
committed
fix: refactor embedded options and embedder logic
1 parent 488a112 commit 89d3cc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1590
-1735
lines changed

.changeset/cuddly-webs-chew.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"prettier-plugin-embed": patch
3+
---
4+
5+
Fix indentation issues in sql, css and markdown embedded languages.

CHANGELOG.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
### Patch Changes
1212

1313
- fbb5cae: Fix wrong options fallback behaviors:
14-
1514
- Empty list of tags and comments shouldn't fallback to identifiers in options.
1615

1716
- 5cadbfa: Fix unstable embedded markdown indentation when using the `useTabs` option: https://github.com/Sec-ant/prettier-plugin-embed/pull/91#issuecomment-1963760555.
@@ -36,7 +35,6 @@
3635
### Patch Changes
3736

3837
- 67d0726: Fix a regression of formatting template literals with only whitespaces:
39-
4038
- Template literals with only whitespaces should be formatted to ` `` `.
4139

4240
## 0.4.11
@@ -45,7 +43,6 @@
4543

4644
- 3639712: Set up changesets
4745
- f4a41e7: Deprecate `identifier`-named options.
48-
4946
- Change options `embedded<Language>Identifiers` to `embedded<Language>Comments` and `embedded<Language>Tags`.
5047
- Remove option ~~`noEmbeddedIdentificationByComment`~~ because it is not needed anymore.
5148
- Remove option ~~`noEmbeddedIdentificationByTag`~~ because it is not needded anymore.

biome.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
4-
"ignore": ["./tests/**/fixtures/**/*"],
4+
"includes": ["**", "!tests/**/fixtures/**/*"],
55
"ignoreUnknown": true
66
},
7-
"organizeImports": {
8-
"enabled": true
9-
},
7+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
108
"formatter": {
119
"enabled": true,
1210
"indentStyle": "space"
@@ -32,15 +30,15 @@
3230
},
3331
"overrides": [
3432
{
35-
"include": ["*.json"],
33+
"includes": ["**/*.json"],
3634
"json": {
3735
"parser": {
3836
"allowTrailingCommas": true
3937
}
4038
}
4139
},
4240
{
43-
"include": ["package.json", ".all-contributorsrc"],
41+
"includes": ["**/package.json", "**/.all-contributorsrc/**"],
4442
"json": {
4543
"formatter": {
4644
"lineWidth": 1

package.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -81,54 +81,54 @@
8181
"bump-biome:nightly": "pnpm add -DE @biomejs/biome@nightly"
8282
},
8383
"devDependencies": {
84-
"@biomejs/biome": "1.9.4",
85-
"@changesets/cli": "^2.28.1",
86-
"@commitlint/cli": "^19.7.1",
87-
"@commitlint/config-conventional": "^19.7.1",
88-
"@prettier/plugin-php": "^0.22.4",
89-
"@prettier/plugin-pug": "^3.2.1",
84+
"@biomejs/biome": "2.3.9",
85+
"@changesets/cli": "^2.29.8",
86+
"@commitlint/cli": "^20.2.0",
87+
"@commitlint/config-conventional": "^20.2.0",
88+
"@prettier/plugin-php": "^0.24.0",
89+
"@prettier/plugin-pug": "^3.4.2",
9090
"@prettier/plugin-ruby": "^4.0.4",
91-
"@prettier/plugin-xml": "^3.4.1",
92-
"@stedi/prettier-plugin-jsonata": "^2.1.3",
93-
"@types/node": "^22.13.5",
94-
"@vitest/coverage-istanbul": "^3.0.6",
95-
"@vitest/ui": "^3.0.6",
91+
"@prettier/plugin-xml": "^3.4.2",
92+
"@stedi/prettier-plugin-jsonata": "^2.1.8",
93+
"@types/node": "^25.0.2",
94+
"@vitest/coverage-istanbul": "^4.0.15",
95+
"@vitest/ui": "^4.0.15",
9696
"@xml-tools/parser": "^1.0.11",
9797
"chevrotain": "7.1.1",
98-
"concurrently": "^9.1.2",
99-
"copy-files-from-to": "^3.12.1",
100-
"esbuild": "^0.25.0",
101-
"lint-staged": "^15.4.3",
102-
"npm-check-updates": "^17.1.14",
103-
"prettier": "^3.5.2",
104-
"prettier-plugin-glsl": "^0.2.0",
98+
"concurrently": "^9.2.1",
99+
"copy-files-from-to": "^3.13.0",
100+
"esbuild": "^0.27.1",
101+
"lint-staged": "^16.2.7",
102+
"npm-check-updates": "^19.2.0",
103+
"prettier": "^3.7.4",
104+
"prettier-plugin-glsl": "^0.2.2",
105105
"prettier-plugin-ini": "^1.3.0",
106-
"prettier-plugin-java": "^2.6.7",
106+
"prettier-plugin-java": "^2.7.7",
107107
"prettier-plugin-latex": "^2.0.1",
108108
"prettier-plugin-nginx": "^1.0.3",
109109
"prettier-plugin-pegjs": "^2.0.2",
110110
"prettier-plugin-prisma": "^5.0.0",
111111
"prettier-plugin-properties": "^0.3.0",
112-
"prettier-plugin-sh": "^0.15.0",
113-
"prettier-plugin-sql": "^0.18.1",
114-
"prettier-plugin-sql-cst": "^0.12.2",
115-
"prettier-plugin-toml": "^2.0.2",
116-
"simple-git-hooks": "^2.11.1",
117-
"tinyglobby": "^0.2.12",
118-
"tsx": "^4.19.3",
119-
"typescript": "^5.7.3",
120-
"vite": "^6.1.1",
121-
"vitest": "^3.0.6"
112+
"prettier-plugin-sh": "^0.18.0",
113+
"prettier-plugin-sql": "^0.19.2",
114+
"prettier-plugin-sql-cst": "^0.17.2",
115+
"prettier-plugin-toml": "^2.0.6",
116+
"simple-git-hooks": "^2.13.1",
117+
"tinyglobby": "^0.2.15",
118+
"tsx": "^4.21.0",
119+
"typescript": "^5.9.3",
120+
"vite": "^7.3.0",
121+
"vitest": "^4.0.15"
122122
},
123123
"dependencies": {
124-
"@types/estree": "^1.0.6",
125-
"dedent": "^1.5.3",
126-
"micro-memoize": "^4.1.3",
124+
"@types/estree": "^1.0.8",
125+
"dedent": "^1.7.0",
126+
"micro-memoize": "^5.1.1",
127127
"package-up": "^5.0.0",
128128
"tiny-jsonc": "^1.0.2",
129-
"type-fest": "^4.35.0"
129+
"type-fest": "^5.3.1"
130130
},
131-
"packageManager": "pnpm@10.4.1+sha512.c753b6c3ad7afa13af388fa6d808035a008e30ea9993f58c6663e2bc5ff21679aa834db094987129aa4d488b86df57f7b634981b2f827cdcacc698cc0cfb88af",
131+
"packageManager": "pnpm@10.26.0+sha512.3b3f6c725ebe712506c0ab1ad4133cf86b1f4b687effce62a9b38b4d72e3954242e643190fc51fa1642949c735f403debd44f5cb0edd657abe63a8b6a7e1e402",
132132
"pnpm": {
133133
"onlyBuiltDependencies": [
134134
"@biomejs/biome",

0 commit comments

Comments
 (0)