diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index 0336a4f06..cdaae2cfc 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you: --> -**Prettier 3.7.4** +**Prettier 3.8.0** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 9e81974b0..043eba44d 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 3.7.4 +- Prettier Version: 3.8.0 - Running Prettier via: - Runtime: - Operating System: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 750f18a87..bc90fa5b9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,14 +4,16 @@ on: push: branches: - main - - patch-release - next + - v* + - patch-release - "!renovate/**" pull_request: branches: - main - - patch-release - next + - v* + - patch-release - "!renovate/**" permissions: diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index 186bab602..92abdaf1e 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -4,8 +4,10 @@ on: push: branches: - main - - patch-release - next + - v* + - patch-release + - "!renovate/**" pull_request: permissions: diff --git a/.github/workflows/eslint-rules.yml b/.github/workflows/eslint-rules.yml index 2a994968c..17885317d 100644 --- a/.github/workflows/eslint-rules.yml +++ b/.github/workflows/eslint-rules.yml @@ -4,8 +4,10 @@ on: push: branches: - main - - patch-release - next + - v* + - patch-release + - "!renovate/**" paths: - "scripts/tools/eslint-plugin-prettier-internal-rules/**" # This workflow file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 52e100884..f08dbcfcf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,8 +4,10 @@ on: push: branches: - main - - patch-release - next + - v* + - patch-release + - "!renovate/**" pull_request: permissions: diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 2c328da35..93f5bc660 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -4,8 +4,10 @@ on: push: branches: - main - - patch-release - next + - v* + - patch-release + - "!renovate/**" pull_request: permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index f71884588..9f49ebbc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 3.8.0 + +[diff](https://github.com/prettier/prettier/compare/3.7.4...3.8.0) + +🔗 [Release Notes](https://prettier.io/blog/2026/01/14/3.8.0) + # 3.7.4 [diff](https://github.com/prettier/prettier/compare/3.7.3...3.7.4) diff --git a/package.json b/package.json index ad06313e6..c63f2bc11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prettier", - "version": "3.8.0-dev", + "version": "3.9.0-dev", "description": "Prettier is an opinionated code formatter", "bin": "./bin/prettier.cjs", "repository": "prettier/prettier", @@ -179,7 +179,7 @@ "node-style-text": "2.1.2", "npm-run-all2": "8.0.4", "open-editor": "6.0.0", - "prettier": "3.7.4", + "prettier": "3.8.0", "pretty-bytes": "7.1.0", "pretty-ms": "9.3.0", "puppeteer": "24.34.0", diff --git a/scripts/release/steps/merge-blog-post.js b/scripts/release/steps/merge-blog-post.js index e1cfa7e99..791168b54 100644 --- a/scripts/release/steps/merge-blog-post.js +++ b/scripts/release/steps/merge-blog-post.js @@ -21,5 +21,5 @@ export default async function mergeBlogPost({ ); await waitForEnter(); - await runGit(["pull", repo]); + await runGit(["pull", "--repo", repo]); } diff --git a/website/blog/2026-01-14-3.8.0.md b/website/blog/2026-01-14-3.8.0.md new file mode 100644 index 000000000..826caf632 --- /dev/null +++ b/website/blog/2026-01-14-3.8.0.md @@ -0,0 +1,154 @@ +--- +authors: "fisker" +title: "Prettier 3.8: Support for Angular v21.1" +--- + +We're excited to announce that Prettier now fully supports the fresh features landing in Angular v21.1 (released today 🎉)! + +This update brings cleaner, more expressive templates with: + +- Consecutive `@case` statements in `@switch` blocks. +- Spread elements (`...`) in array literals, object literals, and function calls inside templates. + +We've also added the ability to format Angular syntax beautifully inside Markdown code blocks. + +If you find Prettier valuable and want to help us keep pace with fast-moving frameworks like Angular, please consider [sponsoring us on OpenCollective](https://opencollective.com/prettier) or supporting the projects we rely on. Thank you for being part of this community — your support means a lot! + + + +## Highlights + +### Angular + +#### Support for consecutive switch cases ([#18593](https://github.com/prettier/prettier/pull/18593) by [@fisker](https://github.com/fisker)) {#change-18593} + + +```html + +@switch (userRole) { + @case ('admin') + @case ('moderator') { +
Welcome, boss! Full access.
+ } + @case ('user') {Standard access
} + @default {Guest view
} +} + + +SyntaxError: Incomplete block "case". If you meant to write the @ character, you should use the "@" HTML entity instead. (2:3) + + +@switch (userRole) { + @case ("admin") + @case ("moderator") { +Welcome, boss! Full access.
+ } + @case ("user") { +Standard access
+ } + @default { +Guest view
+ } +} +``` + +#### Support for spread elements ([#18596](https://github.com/prettier/prettier/pull/18596), [#18636](https://github.com/prettier/prettier/pull/18636) by [@prettier](https://github.com/prettier)) {#change-18596} + + +```html + +