Skip to content

Commit

Permalink
fix(deps): Update dependency prettier to v3.2.5 (#454)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://togithub.com/prettier/prettier)) | devDependencies | patch | [`3.2.4` -> `3.2.5`](https://renovatebot.com/diffs/npm/prettier/3.2.4/3.2.5) |

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.2.5`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#325)

[Compare Source](https://togithub.com/prettier/prettier/compare/3.2.4...3.2.5)

[diff](https://togithub.com/prettier/prettier/compare/3.2.4...3.2.5)

##### Support Angular inline styles as single template literal ([#&#8203;15968](https://togithub.com/prettier/prettier/pull/15968) by [@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki))

[Angular v17](https://blog.angular.io/introducing-angular-v17-4d7033312e4b) supports single string inline styles.

<!-- prettier-ignore -->

```ts
// Input
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.4
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.5
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `
    h1 {
      color: blue;
    }
  `,
})
export class AppComponent {}

```

##### Unexpected embedded formatting for Angular template ([#&#8203;15969](https://togithub.com/prettier/prettier/pull/15969) by [@&#8203;JounQin](https://togithub.com/JounQin))

Computed template should not be considered as Angular component template

<!-- prettier-ignore -->

```ts
// Input
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.4
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.5
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}
```

##### Use `"json"` parser for `tsconfig.json` by default ([#&#8203;16012](https://togithub.com/prettier/prettier/pull/16012) by [@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki))

In [v3.2.0](https://prettier.io/blog/2024/01/12/3.2.0#new-jsonc-parser-added-15831httpsgithubcomprettierprettierpull15831-by-fiskerhttpsgithubcomfisker), we introduced `"jsonc"` parser which adds trialing comma **by default**.

When adding a new parser we also define how it will be used based on the [`linguist-languages`](https://www.npmjs.com/package/linguist-languages) data.

`tsconfig.json` is a special file used by [TypeScript](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#using-tsconfigjson-or-jsconfigjson), it uses `.json` file extension, but it actually uses the [JSON with Comments](https://code.visualstudio.com/docs/languages/json#\_json-with-comments) syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing `.json` file extension.

We decide to treat it as a JSON file for now to avoid the extra configuration step.

To keep using the `"jsonc"` parser for your `tsconfig.json` files, add the following to your `.pretterrc` file

```json
{
  "overrides": [
    {
      "files": ["tsconfig.json", "jsconfig.json"],
      "options": {
        "parser": "jsonc"
      }
    }
  ]
}
```

<!-- prettier-ignore -->

```
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
  • Loading branch information
cq-bot committed Mar 1, 2024
1 parent a070789 commit 1a1afd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.1.3",
"husky": "9.0.8",
"prettier": "3.2.4",
"prettier": "3.2.5",
"typescript": "5.3.3"
}
}

0 comments on commit 1a1afd2

Please sign in to comment.