prettier/prettier (prettier)
### [`v3.0.3`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#303)
[Compare Source](https://togithub.com/prettier/prettier/compare/3.0.2...3.0.3)
[diff](https://togithub.com/prettier/prettier/compare/3.0.2...3.0.3)
##### Add `preferUnplugged: true` to `package.json` ([#15169](https://togithub.com/prettier/prettier/pull/15169) by [@fisker](https://togithub.com/fisker) and [@so1ve](https://togithub.com/so1ve))
Prettier v3 uses dynamic imports, user [will need to unplug Prettier](https://togithub.com/yarnpkg/berry/pull/5411#issuecomment-1523502224) when Yarn's PnP mode is enabled, add [`preferUnplugged: true`](https://yarnpkg.com/configuration/manifest#preferUnplugged) to `package.json`, so Yarn will install Prettier as unplug by default.
##### Support shared config that forbids `require()` ([#15233](https://togithub.com/prettier/prettier/pull/15233) by [@fisker](https://togithub.com/fisker))
If an external shared config package is used, and the package `exports` don't have `require` or `default` export.
In Prettier 3.0.2 Prettier fails when attempt to `require()` the package, and throws an error.
```text
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /package.json
```
##### Allow argument of `require()` to break ([#15256](https://togithub.com/prettier/prettier/pull/15256) by [@fisker](https://togithub.com/fisker))
```jsx
// Input
const plugin = require(
global.STANDALONE
? path.join(__dirname, "../standalone.js")
: path.join(__dirname, "..")
);
// Prettier 3.0.2
const plugin = require(global.STANDALONE
? path.join(__dirname, "../standalone.js")
: path.join(__dirname, ".."));
// Prettier 3.0.3
const plugin = require(
global.STANDALONE
? path.join(__dirname, "../standalone.js")
: path.join(__dirname, "..")
);
```
##### Do not print trailing commas in arrow function type parameter lists in `ts` code blocks ([#15286](https://togithub.com/prettier/prettier/pull/15286) by [@sosukesuzuki](https://togithub.com/sosukesuzuki))
````md
```ts
const foo = () => {}
```
```ts
const foo = () => {}
```
```ts
const foo = () => {}
```
````
##### Support TypeScript 5.2 `using` / `await using` declaration ([#15321](https://togithub.com/prettier/prettier/pull/15321) by [@sosukesuzuki](https://togithub.com/sosukesuzuki))
Support for the upcoming Explicit Resource Management feature in ECMAScript. [`using` / `await using` declaration](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management)
```tsx
{
using foo = new Foo();
await using bar = new Bar();
}
```
### [`v3.0.2`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#302)
[Compare Source](https://togithub.com/prettier/prettier/compare/3.0.1...3.0.2)
[diff](https://togithub.com/prettier/prettier/compare/3.0.1...3.0.2)
##### Break after `=` of assignment if RHS is poorly breakable AwaitExpression or YieldExpression ([#15204](https://togithub.com/prettier/prettier/pull/15204) by [@seiyab](https://togithub.com/seiyab))
```js
// Input
const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData);
// Prettier 3.0.1
const { section, rubric, authors, tags } = await utils.upsertCommonData(
mainData,
);
// Prettier 3.0.2
const { section, rubric, authors, tags } =
await utils.upsertCommonData(mainData);
```
##### Do not add trailing comma for grouped scss comments ([#15217](https://togithub.com/prettier/prettier/pull/15217) by [@auvred](https://togithub.com/auvred))
```scss
/* Input */
$foo: (
'property': (),
// comment 1
// comment 2
)
/* Prettier 3.0.1 */
$foo: (
"property": (),
// comment 1
// comment 2,
);
/* Prettier 3.0.2 */
$foo: (
"property": (),
// comment 1
// comment 2
);
```
##### Print `declare` and `export` keywords for nested namespace ([#15249](https://togithub.com/prettier/prettier/pull/15249) by [@sosukesuzuki](https://togithub.com/sosukesuzuki))
```tsx
// Input
declare namespace abc1.def {}
export namespace abc2.def {}
// Prettier 3.0.1
namespace abc1.def {}
namespace abc2.def {}
// Prettier 3.0.2
declare namespace abc1.def {}
export namespace abc2.def {}
```
Configuration
📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone Europe/Berlin, 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.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
3.0.1
->3.0.3
Release Notes
prettier/prettier (prettier)
### [`v3.0.3`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#303) [Compare Source](https://togithub.com/prettier/prettier/compare/3.0.2...3.0.3) [diff](https://togithub.com/prettier/prettier/compare/3.0.2...3.0.3) ##### Add `preferUnplugged: true` to `package.json` ([#15169](https://togithub.com/prettier/prettier/pull/15169) by [@fisker](https://togithub.com/fisker) and [@so1ve](https://togithub.com/so1ve)) Prettier v3 uses dynamic imports, user [will need to unplug Prettier](https://togithub.com/yarnpkg/berry/pull/5411#issuecomment-1523502224) when Yarn's PnP mode is enabled, add [`preferUnplugged: true`](https://yarnpkg.com/configuration/manifest#preferUnplugged) to `package.json`, so Yarn will install Prettier as unplug by default. ##### Support shared config that forbids `require()` ([#15233](https://togithub.com/prettier/prettier/pull/15233) by [@fisker](https://togithub.com/fisker)) If an external shared config package is used, and the package `exports` don't have `require` or `default` export. In Prettier 3.0.2 Prettier fails when attempt to `require()` the package, and throws an error. ```text Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined inConfiguration
📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone Europe/Berlin, 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.
This PR has been generated by Mend Renovate. View repository job log here.