Merge branch 'v3.8.x'

# Conflicts:
#	package.json
#	src/language-js/print/function-parameters.js
#	tests/format/angular/control-flow/__snapshots__/format.test.js.snap
#	yarn.lock
This commit is contained in:
fisker committed 2026-04-10 10:42:45 +08:00
commit 4d42f87154
8 files changed
+73 -68

No files matched your search

+46
View File
@@ -1,3 +1,49 @@
# 3.8.2
[diff](https://github.com/prettier/prettier/compare/3.8.1...3.8.2)
#### Angular: Support Angular v21.2 ([#18722](https://github.com/prettier/prettier/pull/18722), [#19034](https://github.com/prettier/prettier/pull/19034) by [@fisker](https://github.com/fisker))
Exhaustive typechecking with `@default never;`
<!-- prettier-ignore -->
```html
<!-- Input -->
@switch (foo) {
@case (1) {}
@default never;
}
<!-- Prettier 3.8.1 -->
SyntaxError: Incomplete block "default never". If you meant to write the @ character, you should use the "&#64;" HTML entity instead. (3:3)
<!-- Prettier 3.8.2 -->
@switch (foo) {
@case (1) {}
@default never;
}
```
`arrow function` and `instanceof` expressions.
<!-- prettier-ignore -->
```html
<!-- Input -->
@let fn = (a) => a? 1:2;
{{ fn ( a instanceof b)}}
<!-- Prettier 3.8.1 -->
@let fn = (a) => a? 1:2;
{{ fn ( a instanceof b)}}
<!-- Prettier 3.8.2 -->
@let fn = (a) => (a ? 1 : 2);
{{ fn(a instanceof b) }}
```
# 3.8.1
[diff](https://github.com/prettier/prettier/compare/3.8.0...3.8.1)