diff --git a/changelog_unreleased/angular/16922-2.md b/changelog_unreleased/angular/16922-2.md deleted file mode 100644 index 446699da2..000000000 --- a/changelog_unreleased/angular/16922-2.md +++ /dev/null @@ -1,27 +0,0 @@ -#### Improve line breaks inside ICU blocks (#16922 by @fisker) - - -```html - -The author is {gender, select, male {male} female {female} other {other}} -The author is male consectetur adipiscing elit, sed do eiusmod - - -The author is {gender, select, male {male} female {female} other {other} -} -The author is - male consectetur adipiscing elit, sed do eiusmod - - -The author is - {gender, select, male {male} female {female} other {other}} -The author is - male consectetur adipiscing elit, sed do eiusmod -``` diff --git a/changelog_unreleased/angular/16922.md b/changelog_unreleased/angular/16922.md deleted file mode 100644 index 4c70bcff5..000000000 --- a/changelog_unreleased/angular/16922.md +++ /dev/null @@ -1,36 +0,0 @@ -#### Fix extra new line inside ICU blocks (#16922 by @fisker) - - -```html - -{active, select, - true { - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp - } - false { - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp - } -} - - -{active, select, - true { - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp - - } - false { - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp - - } -} - - -{active, select, - true { - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp - } - false { - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp - } -} -``` diff --git a/changelog_unreleased/api/16828.md b/changelog_unreleased/api/16828.md deleted file mode 100644 index ce4030a5e..000000000 --- a/changelog_unreleased/api/16828.md +++ /dev/null @@ -1,42 +0,0 @@ -#### [HIGHLIGHT]Add support for TypeScript config files (#16828 by @itsyoboieltr & @fisker) - -Added new format of configuration files: - -- `.prettierrc.ts` -- `.prettierrc.mts` -- `.prettierrc.cts` -- `prettier.config.ts` -- `prettier.config.mts` -- `prettier.config.cts` - -Note: - -Currently TypeScript support in Node.js is experimental. - -To make TypeScript config files work, Node.js>=22.6.0 is required and Node.js v22 requires `--experimental-strip-types`. - -You can run prettier with - -```sh -node --experimental-strip-types node_modules/prettier/bin/prettier.cjs . --write -``` - -or - -```sh -NODE_OPTIONS="--experimental-strip-types" prettier . --write -``` - -Other TS loaders should also work, but not tested, use at your own risk. - -For example, with [`tsx`](https://tsx.is/), you can - -```sh -node --import tsx node_modules/prettier/bin/prettier.cjs . --write -``` - -or - -```sh -tsx node_modules/prettier/bin/prettier.cjs . --write -``` diff --git a/changelog_unreleased/api/17041.md b/changelog_unreleased/api/17041.md deleted file mode 100644 index dfeddafed..000000000 --- a/changelog_unreleased/api/17041.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Support read config from `package.json` with JSONC syntax on Bun (#17041 by @fisker) - -[Bun 1.2 added JSONC support in `package.json`](https://bun.sh/blog/bun-v1.2#jsonc-support-in-package-json), in previous version of Prettier, it will ignore `prettier` config in it. Since Prettier main, we can read `prettier` config from it without error. - -However, since it's just a Bun feature and not supported by Node.js, it can only work when running Prettier with Bun. - -Important note: Prettier uses [`json-stringify` parser](https://prettier.io/docs/en/options#parser) to format `package.json` file by default, to support formatting `package.json` file with JSONC syntax, you need override the parser option - -```js -export default { - overrides: [ - { - files: ["package.json"], - options: { - parser: "jsonc", - }, - }, - ], -}; -``` - -If you can't upgrade Prettier for some reason, you can still use JSONC syntax in `package.json`, but don't put your `prettier` config in it, you'll have to use another [configuration file](https://prettier.io/docs/en/configuration). diff --git a/changelog_unreleased/css/16907.md b/changelog_unreleased/css/16907.md deleted file mode 100644 index a8c0a79bf..000000000 --- a/changelog_unreleased/css/16907.md +++ /dev/null @@ -1,28 +0,0 @@ -#### Break before breaking comma separated values (#16907 by @seiyab) - - -```css -/* Input */ -a { - background-image: - linear-gradient(to bottom, rgb(255 255 0 / 50%), rgb(0 0 255 / 50%)), - url("catfront.png"); -} - -/* Prettier stable */ -a { - background-image: linear-gradient( - to bottom, - rgb(255 255 0 / 50%), - rgb(0 0 255 / 50%) - ), - url("catfront.png"); -} - -/* Prettier main */ -a { - background-image: - linear-gradient(to bottom, rgb(255 255 0 / 50%), rgb(0 0 255 / 50%)), - url("catfront.png"); -} -``` diff --git a/changelog_unreleased/flow/16947.md b/changelog_unreleased/flow/16947.md deleted file mode 100644 index 1d48db75a..000000000 --- a/changelog_unreleased/flow/16947.md +++ /dev/null @@ -1,12 +0,0 @@ -#### Support `const` type parameters in Flow (#16947 by @gkz) - - -```jsx -function f(): void {} - -// Prettier stable -// Parse error - -// Prettier main -function f(): void {} -``` diff --git a/changelog_unreleased/handlebars/15087.md b/changelog_unreleased/handlebars/15087.md deleted file mode 100644 index 8043a0ac4..000000000 --- a/changelog_unreleased/handlebars/15087.md +++ /dev/null @@ -1,40 +0,0 @@ -#### Handle ` - -{{!-- Prettier stable --}} -
-  cd ~ ls echo "hey"
-
- - -{{!-- Prettier main --}} -
-  cd ~
-  ls
-  echo "hey"
-
- -``` diff --git a/changelog_unreleased/javascript/16163.md b/changelog_unreleased/javascript/16163.md deleted file mode 100644 index f690b0e21..000000000 --- a/changelog_unreleased/javascript/16163.md +++ /dev/null @@ -1,32 +0,0 @@ -#### [HIGHLIGHT]Implement `objectWrap` config option (#16163 by @pauldraper, @sosukesuzuki) - -Prettier has historically done semi-manual formatting of multi-line JavaScript object literals. - -Namely, an object is kept on multiple lines if there is a newline prior to the first property, even if it could fit on a single line. See [Multi-line objects](https://prettier.io/docs/rationale#multi-line-objects) for more details. - -While this behavior continues to be the default, `--object-wrap=collapse` instead ignores whitespace when formatting object literals. - - -```js -// Input -const obj1 = { - name1: "value1", name2: "value2", -}; - -const obj2 = { name1: "value1", - name2: "value2", -}; - -// Prettier stable -const obj1 = { - name1: "value1", - name2: "value2", -}; - -const obj2 = { name1: "value1", name2: "value2" }; - -// Prettier main (with `--object-wrapping=collapse`) -const obj1 = { name1: "value1", name2: "value2" }; - -const obj2 = { name1: "value1", name2: "value2" }; -``` diff --git a/changelog_unreleased/javascript/16700.md b/changelog_unreleased/javascript/16700.md deleted file mode 100644 index f4a1ec81f..000000000 --- a/changelog_unreleased/javascript/16700.md +++ /dev/null @@ -1,28 +0,0 @@ -#### Improve word wrapping edge cases in JSX (#16700 by @seiyab) - - -```jsx -// Input -br_triggers_expression_break = -

- text text text text text text text text text text text {this.props.type}
- -// Prettier stable -br_triggers_expression_break = ( -
-
- text text text text text text text text text text text { - this.props.type - }{" "} -
-); - -// Prettier main -br_triggers_expression_break = ( -
-
- text text text text text text text text text text text{" "} - {this.props.type}{" "} -
-); -``` diff --git a/changelog_unreleased/javascript/7111.md b/changelog_unreleased/javascript/7111.md deleted file mode 100644 index f92ee059f..000000000 --- a/changelog_unreleased/javascript/7111.md +++ /dev/null @@ -1,23 +0,0 @@ -#### [HIGHLIGHT]Add experimental option for breaking lines before binary operators (#7111 by @btmills) - -This is implemented behind the `--experimental-operator-position ` flag. - -When binary expressions wrap lines, `start` prints the operators at the start of new lines. Placing binary operators at the beginning of wrapped lines can make the operators more prominent and easier to scan. - - -```jsx -// Input -var a = Math.random() * (yRange * (1 - minVerticalFraction)) + minVerticalFraction * yRange - offset; - -// `experimentalOperatorPosition: end` (default behavior) -var a = - Math.random() * (yRange * (1 - minVerticalFraction)) + - minVerticalFraction * yRange - - offset; - -// `experimentalOperatorPosition: start` -var a = - Math.random() * (yRange * (1 - minVerticalFraction)) - + minVerticalFraction * yRange - - offset; -``` diff --git a/changelog_unreleased/markdown/16832.md b/changelog_unreleased/markdown/16832.md deleted file mode 100644 index ce77e3805..000000000 --- a/changelog_unreleased/markdown/16832.md +++ /dev/null @@ -1,22 +0,0 @@ -#### U+FF5E as CJK punctuation (#16832 by @tats-u) - -U+FF5E FULLWIDTH TILDE (~) is commonly used as a substitute for U+301C WAVE DASH (〜) in Windows for Japanese. Full width alphabets are less used in Markdown documents comparing to other types of documents (e.g. Microsoft Office documents), and the full width tilde is much less used as this purpose compared to full width alphabets and digits. Therefore, we can assume that the full width tilde in Markdown documents in the wild are a alternative form of the wave dash and a part of CJK punctuation. - - -```markdown - -a 字 a 字 a 字 -60~ -100点 -60〜 -100点 - - -a 字 a 字 a 字 60~ 100点 60〜10点 - - - -a 字 a 字 a 字 60~10点 60〜100点 -``` - -The first symbol between 60 and 100 in the above example is U+FF5E FULLWIDTH TILDE (~) and the second one is U+301C WAVE DASH (〜). diff --git a/changelog_unreleased/misc/16958.md b/changelog_unreleased/misc/16958.md deleted file mode 100644 index e9d41630d..000000000 --- a/changelog_unreleased/misc/16958.md +++ /dev/null @@ -1,5 +0,0 @@ -#### Use ESM entrypoint for `require(ESM)` (#16958 by @tats-u) - -Node.js 22.12 or later [can (experimentally) load ESM modules with `require` function](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require) without runtime flags. This change enables `require` to load Prettier without the CommonJS entrypoint with almost only the ability to import the ESM entrypoint. - -The feature to load ES modules with `require` is not completely stable but can be used without ExperimentalWarning as of Node 22.13. diff --git a/changelog_unreleased/vue/16920.md b/changelog_unreleased/vue/16920.md deleted file mode 100644 index 4008fa4d7..000000000 --- a/changelog_unreleased/vue/16920.md +++ /dev/null @@ -1,21 +0,0 @@ -#### Support `.prop` shorthand (#16920 by @fisker) - -`.foo` is shorthand for `v-bind:foo.prop`. See [`v-bind` builtin directive](https://vuejs.org/api/built-in-directives.html#v-bind) for details. - - -```vue - - - - - - - - -``` diff --git a/scripts/release/steps/clean-changelog.js b/scripts/release/steps/clean-changelog.js index 24482ace1..9843b6aa4 100644 --- a/scripts/release/steps/clean-changelog.js +++ b/scripts/release/steps/clean-changelog.js @@ -18,3 +18,6 @@ export default async function cleanChangelog({ repo }) { await runGit(["commit", "-am", "Clean changelog_unreleased"]); await runGit(["push", "--repo", repo]); } + + +cleanChangelog("git@github.com:prettier/prettier.git");