From f53791a2c815b03ea6f0b7f525c59d3c446bc0fd Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Tue, 26 Nov 2024 13:53:25 +0900 Subject: [PATCH] Clean changelog_unreleased --- changelog_unreleased/angular/16862.md | 21 --- changelog_unreleased/api/13315.md | 3 - changelog_unreleased/api/16567.md | 34 ----- changelog_unreleased/api/16857.md | 12 -- changelog_unreleased/cli/16684.md | 5 - changelog_unreleased/css/16570.md | 30 ---- changelog_unreleased/css/16572.md | 30 ---- changelog_unreleased/css/16583.md | 23 ---- changelog_unreleased/html/16765.md | 18 --- changelog_unreleased/javascript/13315-2.md | 19 --- changelog_unreleased/javascript/16500.md | 16 --- changelog_unreleased/javascript/16563.md | 23 ---- changelog_unreleased/javascript/16593.md | 27 ---- changelog_unreleased/javascript/16643.md | 6 - changelog_unreleased/markdown/15526.md | 25 ---- changelog_unreleased/markdown/16546.md | 16 --- changelog_unreleased/markdown/16619.md | 35 ----- changelog_unreleased/markdown/16691.md | 153 --------------------- changelog_unreleased/markdown/16816.md | 23 ---- changelog_unreleased/misc/15709.md | 5 - changelog_unreleased/scss/16607.md | 22 --- changelog_unreleased/scss/16617.md | 22 --- changelog_unreleased/typescript/16500-2.md | 16 --- changelog_unreleased/typescript/16574.md | 35 ----- changelog_unreleased/typescript/16578.md | 31 ----- changelog_unreleased/typescript/16586.md | 28 ---- changelog_unreleased/typescript/16729.md | 13 -- changelog_unreleased/typescript/16730.md | 38 ----- changelog_unreleased/typescript/16731.md | 19 --- changelog_unreleased/vue/16733.md | 22 --- changelog_unreleased/yaml/16489.md | 16 --- 31 files changed, 786 deletions(-) delete mode 100644 changelog_unreleased/angular/16862.md delete mode 100644 changelog_unreleased/api/13315.md delete mode 100644 changelog_unreleased/api/16567.md delete mode 100644 changelog_unreleased/api/16857.md delete mode 100644 changelog_unreleased/cli/16684.md delete mode 100644 changelog_unreleased/css/16570.md delete mode 100644 changelog_unreleased/css/16572.md delete mode 100644 changelog_unreleased/css/16583.md delete mode 100644 changelog_unreleased/html/16765.md delete mode 100644 changelog_unreleased/javascript/13315-2.md delete mode 100644 changelog_unreleased/javascript/16500.md delete mode 100644 changelog_unreleased/javascript/16563.md delete mode 100644 changelog_unreleased/javascript/16593.md delete mode 100644 changelog_unreleased/javascript/16643.md delete mode 100644 changelog_unreleased/markdown/15526.md delete mode 100644 changelog_unreleased/markdown/16546.md delete mode 100644 changelog_unreleased/markdown/16619.md delete mode 100644 changelog_unreleased/markdown/16691.md delete mode 100644 changelog_unreleased/markdown/16816.md delete mode 100644 changelog_unreleased/misc/15709.md delete mode 100644 changelog_unreleased/scss/16607.md delete mode 100644 changelog_unreleased/scss/16617.md delete mode 100644 changelog_unreleased/typescript/16500-2.md delete mode 100644 changelog_unreleased/typescript/16574.md delete mode 100644 changelog_unreleased/typescript/16578.md delete mode 100644 changelog_unreleased/typescript/16586.md delete mode 100644 changelog_unreleased/typescript/16729.md delete mode 100644 changelog_unreleased/typescript/16730.md delete mode 100644 changelog_unreleased/typescript/16731.md delete mode 100644 changelog_unreleased/vue/16733.md delete mode 100644 changelog_unreleased/yaml/16489.md diff --git a/changelog_unreleased/angular/16862.md b/changelog_unreleased/angular/16862.md deleted file mode 100644 index 928d00403..000000000 --- a/changelog_unreleased/angular/16862.md +++ /dev/null @@ -1,21 +0,0 @@ -#### Support Angular 19 (#16862 by @fisker) - -Angular 19 added [support for `typeof` keyword in template expressions](https://github.com/angular/angular/pull/58183). - - -```html - -
{{ typeof - x === - 'object' ? 'Y' : 'N'}}
- - -
- {{ typeof - x === - 'object' ? 'Y' : 'N'}} -
- -// Prettier main -
{{ typeof x === "object" ? "Y" : "N" }}
-``` diff --git a/changelog_unreleased/api/13315.md b/changelog_unreleased/api/13315.md deleted file mode 100644 index cc593ea5c..000000000 --- a/changelog_unreleased/api/13315.md +++ /dev/null @@ -1,3 +0,0 @@ -#### Stop doc mutation in `prettier.doc.printDocToString` (#13315 by @fisker) - -For performance reason, `prettier.doc.printDocToString` used to mutate `.parts` of the [`fill`](https://github.com/prettier/prettier/blob/main/commands.md#fill) command during print. It was converted to a [pure function](https://en.wikipedia.org/wiki/Pure_function) to ensure output correctness. diff --git a/changelog_unreleased/api/16567.md b/changelog_unreleased/api/16567.md deleted file mode 100644 index 8147d50c0..000000000 --- a/changelog_unreleased/api/16567.md +++ /dev/null @@ -1,34 +0,0 @@ -#### Make `getPreferredQuote` public (#16567 by @sosukesuzuki) - -This change makes the internal `getPreferredQuote` function a part of the public API. - -In languages like JavaScript, both single quotes and double quotes can be used for string literals. Prettier determines the quote to enclose a string literal based on the number of quotes within the string and the value of the [`singleQuote`](https://prettier.io/docs/en/options#quotes) option. For more details, please refer to the [Rationale](https://prettier.io/docs/en/rationale.html#strings) page. - -The `getPreferredQuote` function determines the appropriate quote to enclose a string literal and has the following interface: - -```ts -type Quote = '"' | "'"; -function getPreferredQuote( - text: string, - preferredQuoteOrPreferSingleQuote: Quote | boolean, -): Quote; -``` - -Here are some examples of how to use it: - - -```jsx -import * as prettier from "prettier"; - -const SINGLE_QUOTE = `'`; -const DOUBLE_QUOTE = `"`; - -console.log(prettier.util.getPreferredQuote(`Hello World Test`, SINGLE_QUOTE)); // ' -console.log(prettier.util.getPreferredQuote(`Hello World Test`, DOUBLE_QUOTE)); // " -console.log(prettier.util.getPreferredQuote(`'Hello' "World" 'Test'`, SINGLE_QUOTE)); // " -console.log(prettier.util.getPreferredQuote(`"Hello" 'World' "Test"`, DOUBLE_QUOTE)); // ' -console.log(prettier.util.getPreferredQuote(`"Hello" "World" "Test"`, SINGLE_QUOTE)); // ' -console.log(prettier.util.getPreferredQuote(`'Hello' 'World' 'Test'`, DOUBLE_QUOTE)); // " -``` - -Making this function public will benefit plugin developers. Since the function is relatively short, you can find more details in the [implementation](https://github.com/prettier/prettier/blob/509a0cc10f12cbfa5304737965f99284449aca88/src/utils/get-preferred-quote.js). diff --git a/changelog_unreleased/api/16857.md b/changelog_unreleased/api/16857.md deleted file mode 100644 index 6b3b18897..000000000 --- a/changelog_unreleased/api/16857.md +++ /dev/null @@ -1,12 +0,0 @@ -#### Fix loading ESM-style shared config file in Node.js 23 (#16857 by @sosukesuzuki) - -In Prettier 3.3, attempting to load an ESM-style [shared config file](https://prettier.io/docs/en/sharing-configurations) in Node.js 23 resulted in the following warnings, preventing the options from being loaded: - -``` -[warn] Ignored unknown option { __esModule: true }. -[warn] Ignored unknown option { default: { trailingComma: "es5", tabWidth: 4, singleQuote: true } }. -``` - -This issue was caused by a new module feature in Node.js 23, known as [`require(ESM)`](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require). Prettier 3.4 resolves this problem, allowing the options to load correctly. - -For more details, please see https://github.com/prettier/prettier/issues/16812. diff --git a/changelog_unreleased/cli/16684.md b/changelog_unreleased/cli/16684.md deleted file mode 100644 index 2c73f878d..000000000 --- a/changelog_unreleased/cli/16684.md +++ /dev/null @@ -1,5 +0,0 @@ -#### Ignore files in the Jujutsu directory (#16684 by @marcusirgens) - -The Jujutsu VCS uses the `.jj` directory, similarly to how Git uses `.git`. - -This change adds `.jj` to the list of directories which are silently ignored by prettier. diff --git a/changelog_unreleased/css/16570.md b/changelog_unreleased/css/16570.md deleted file mode 100644 index 401bf5a5c..000000000 --- a/changelog_unreleased/css/16570.md +++ /dev/null @@ -1,30 +0,0 @@ -#### Resolve some types of overrun in CSS (#16570 by @seiyab) - - -```css -/* Input */ -@media (prefers-reduced-data: no-preference) { - @font-face { - unicode-range: U+0000-00FF, U+0131, -U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; - } -} - -/* Prettier stable */ -@media (prefers-reduced-data: no-preference) { - @font-face { - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, - U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, - U+2215, U+FEFF, U+FFFD; - } -} - -/* Prettier main */ -@media (prefers-reduced-data: no-preference) { - @font-face { - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, - U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, - U+2212, U+2215, U+FEFF, U+FFFD; - } -} -``` diff --git a/changelog_unreleased/css/16572.md b/changelog_unreleased/css/16572.md deleted file mode 100644 index bacb785f4..000000000 --- a/changelog_unreleased/css/16572.md +++ /dev/null @@ -1,30 +0,0 @@ -#### Remove extra indentation in pseudo-class function (#16572 by @sosukesuzuki) - -This change fixes a bug where extra indentation was added when line breaks were included in the argument list of pseudo-class functions like [`:where()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:where), [`:is()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:is), and [`:not`](https://developer.mozilla.org/en-US/docs/Web/CSS/:not). - - -```css -/* Input */ -:where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { - /* CSS here */ -} - -/* Prettier stable */ -:where( - input:not([type="button"], [type="reset"], [type="submit"]), - textarea, - select - ) { - /* CSS here */ -} - -/* Prettier main */ -:where( - input:not([type="button"], [type="reset"], [type="submit"]), - textarea, - select -) { - /* CSS here */ -} - -``` diff --git a/changelog_unreleased/css/16583.md b/changelog_unreleased/css/16583.md deleted file mode 100644 index 210447c55..000000000 --- a/changelog_unreleased/css/16583.md +++ /dev/null @@ -1,23 +0,0 @@ -#### Fix formatting of incomplete CSS value comments (#16583 by @sosukesuzuki, @fisker) - -When formatting CSS value comments, the trailing `/` may be lost, resulting in an invalid comment. - -This change ensures that value comments are not truncated. - - -```css -/* Input */ -h1 { - --OFF: /* OFF */; -} - -/* Prettier stable */ -h1 { - --OFF: /* OFF *; -} - -/* Prettier main */ -h1 { - --OFF: /* OFF */; -} -``` diff --git a/changelog_unreleased/html/16765.md b/changelog_unreleased/html/16765.md deleted file mode 100644 index f4232830b..000000000 --- a/changelog_unreleased/html/16765.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Keep doctype in non-html files unchanged (#16765 by @fisker) - -In Prettier v3, [we print HTML5 doctype in lowercase](https://prettier.io/blog/2023/07/05/3.0.0#print-html5-doctype-in-lowercase-7391httpsgithubcomprettierprettierpull7391-by-fiskerhttpsgithubcomfisker), it's safe for HTML files, however users may use the `html` parser to format other files eg: XHTML files, lowercase the `doctype` will break XHTML documents. - -Since Prettier main, we'll only lowercase [HTML5 doctype (``)](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide/HTML#doctype) when the file extension is `.html` or `.htm`, otherwise they will be untouched. - - -```html - - - - - - - - - -``` diff --git a/changelog_unreleased/javascript/13315-2.md b/changelog_unreleased/javascript/13315-2.md deleted file mode 100644 index a4677d4e3..000000000 --- a/changelog_unreleased/javascript/13315-2.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Fix template literal print with array (#13315 by @fisker, @syi0808) - - -```jsx -// Input -const string = `${[[1, 2], [3, 4]]}` - -// Prettier stable -const string = `${[ - [2], - [4], -]}`; - -// Prettier main -const string = `${[ - [1, 2], - [3, 4], -]}`; -``` diff --git a/changelog_unreleased/javascript/16500.md b/changelog_unreleased/javascript/16500.md deleted file mode 100644 index 8ca4a74d6..000000000 --- a/changelog_unreleased/javascript/16500.md +++ /dev/null @@ -1,16 +0,0 @@ -#### Add missing parentheses in tagged template literals (#16500 by @syi0808) - - -```jsx -// Input -(String?.raw)``; -(getTag?.())``; - -// Prettier stable -String?.raw``; -getTag?.()``; - -// Prettier main -(String?.raw)``; -(getTag?.())``; -``` diff --git a/changelog_unreleased/javascript/16563.md b/changelog_unreleased/javascript/16563.md deleted file mode 100644 index 6b277ba81..000000000 --- a/changelog_unreleased/javascript/16563.md +++ /dev/null @@ -1,23 +0,0 @@ -#### Don't remove useless `\` in string literals (#16563 by @sosukesuzuki, #16763 by @fisker) - -Previously, Prettier would remove useless escape characters (`\`) from string literals. However, this behavior was inconsistent as it did not apply to template literals, which was reported in [issue #16542](https://github.com/prettier/prettier/issues/16542). - -This issue is a feature request to extend this behavior to template literals as well. - -After discussing this internally, the Prettier team concluded that removing useless escape characters, whether in string literals or template literals, is the responsibility of a linter, not a formatter. - -This change disables the removal of useless escape characters in string literals across all languages supported by Prettier. To keep the previous behavior, we recommend using ESLint rules like [`no-useless-escape`](https://eslint.org/docs/latest/rules/no-useless-escape). - -Escaped quotes (e.g. `"\"\'"`) may get unescaped when changing between different quotes. This is explained on the [Rationale](https://prettier.io/docs/en/rationale.html#strings) page of the official documentation. - - -```jsx -// Input -const str = "\a"; - -// Prettier stable -const str = "a"; - -// Prettier main -const str = "\a"; -``` diff --git a/changelog_unreleased/javascript/16593.md b/changelog_unreleased/javascript/16593.md deleted file mode 100644 index 80b4442f4..000000000 --- a/changelog_unreleased/javascript/16593.md +++ /dev/null @@ -1,27 +0,0 @@ -#### Improve comment formatting for logical expression in unary expression (#16593 by @sosukesuzuki) - - -```jsx -// Input -!( - cond1 || // foo - cond2 || // bar - cond3 // baz -); - -// Prettier stable -!( - ( - cond1 || // foo - cond2 || // bar - cond3 - ) // baz -); - -// Prettier main -!( - cond1 || // foo - cond2 || // bar - cond3 // baz -); -``` diff --git a/changelog_unreleased/javascript/16643.md b/changelog_unreleased/javascript/16643.md deleted file mode 100644 index 69c403f83..000000000 --- a/changelog_unreleased/javascript/16643.md +++ /dev/null @@ -1,6 +0,0 @@ -#### Removed support for experimental syntax (#16643, #16705 by @fisker) - -- `DecimalLiteral` - The [Decimal proposal](https://github.com/tc39/proposal-decimal) decided not introduce new syntax. The `decimal` plugin will be removed from Babel 8. -- `importReflection` - The "Import Reflection" proposal has renamed as ["Source Phase Imports"](https://github.com/tc39/proposal-source-phase-imports) - -- [Disclaimer about non-standard syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) diff --git a/changelog_unreleased/markdown/15526.md b/changelog_unreleased/markdown/15526.md deleted file mode 100644 index 9a0090780..000000000 --- a/changelog_unreleased/markdown/15526.md +++ /dev/null @@ -1,25 +0,0 @@ -#### Removed excessive spaces after line prefixes for unordered lists in Markdown (#15526 by @TomasLudvik) - - -```md - -- first line - - second line indented -- third line - - fourth line - - fifth line - - -- first line - - second line indented -- third line - - fourth line - - fifth line - - -- first line - - second line indented -- third line - - fourth line - - fifth line -``` diff --git a/changelog_unreleased/markdown/16546.md b/changelog_unreleased/markdown/16546.md deleted file mode 100644 index 47ef4f54d..000000000 --- a/changelog_unreleased/markdown/16546.md +++ /dev/null @@ -1,16 +0,0 @@ -#### Fix incorrect wrap in sentence with linkReference (#16546 by @seiyab) - - -```md - -This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run them, install VHS from main (the theme and screenshot commands are not yet released). - - -This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run -them, install VHS from main (the theme and screenshot commands are not yet released). - - -This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To -run them, install VHS from main (the theme and screenshot commands are not yet -released). -``` diff --git a/changelog_unreleased/markdown/16619.md b/changelog_unreleased/markdown/16619.md deleted file mode 100644 index f9822600c..000000000 --- a/changelog_unreleased/markdown/16619.md +++ /dev/null @@ -1,35 +0,0 @@ -#### Preserve non-ASCII whitespaces at the end of the line and beginning of the next line (#16619 by @tats-u) - -Prettier removes non-ASCII spaces at the end of the line and beginning of the next line. However, this behavior is not consistent with the CommonMark spec. - -https://spec.commonmark.org/0.31.2/#soft-line-breaks - -> Spaces at the end of the line and beginning of the next line are removed: - -https://spec.commonmark.org/0.31.2/#unicode-whitespace-character - -> A Unicode whitespace character is a character in the Unicode Zs general category, or a tab (U+0009), line feed (U+000A), form feed (U+000C), or carriage return (U+000D). - -> Unicode whitespace is a sequence of one or more Unicode whitespace characters. - -> A space is U+0020. - -The CommonMark spec doesn't mention non-ASCII spaces here, so removing them changes the content of the Markdown document. - - -```md - - EM Space (U+2003) EM Space  - - 全角スペース (U+3000) 全形空白  - - -EM Space (U+2003) EM Space - -全角スペース (U+3000) 全形空白 - - - EM Space (U+2003) EM Space  - - 全角スペース (U+3000) 全形空白  -``` diff --git a/changelog_unreleased/markdown/16691.md b/changelog_unreleased/markdown/16691.md deleted file mode 100644 index c9c81a124..000000000 --- a/changelog_unreleased/markdown/16691.md +++ /dev/null @@ -1,153 +0,0 @@ -#### Don't break a line a between Chinese or Japanese and others (#16691 by @tats-u) - -Markdown documents are mainly converted to HTML or components of JavaScript-based frameworks. This means that paragraphs in Markdown are eventually processed by the browser according to [CSS rules](https://drafts.csswg.org/css-text-4/). This is because many Markdown converter preserve line breaks in paragraphs in input Markdown and HTML itself does not specify how browsers should handle line breaks in text in HTML. - -According to [CSS rules (CSS Text Module Level 3 or later)](https://drafts.csswg.org/css-text-4/#line-break-transform), browsers should remove line breaks between Chinese/Japanese characters instead of replacing them with spaces. However, this rule has been ignored by WebKit-based or Webkit-derived browsers (Chrome, Safari, and so on) for long time. - -For example, the following HTML paragraph: - - -```html -

-日本語 -汉语 -漢語 -

-``` - -generated from the following Markdown: - -```md -日本語 -汉语 -漢語 -``` - -should be rendered as follows according to CSS rules and actually is rendered such by Firefox: - -```md -日本語汉语漢語 -``` - -However, Chrome and Safari render it as follows: - -```md -日本語 汉语 漢語 -``` - -This is why we should stop Prettier from line breaking between Chinese/Japanese characters. We decided to stop Prettier from forcing users to use a plugin for a Markdown converter that concatenates lines that start or end with Chinese/Japanese characters ([remark-join-cjk-lines](https://www.npmjs.com/package/remark-join-cjk-lines), for example). - -Also, [a line break between Chinese/Japanese and others are equivalent to a space](https://github.com/w3c/csswg-drafts/blob/076914a198bf3ac642001619e08acefdf607d61d/css-text/Overview.bs#L712) according to before [the commit suspending a concrete rule in CSS Text Module Level 3 by commenting it out](https://github.com/w3c/csswg-drafts/commit/b3bb0ed18b3168981c54c437bcfb5881ef49975b) fixing [an issue on the CSS Working Group Editor Drafts](https://github.com/w3c/csswg-drafts/issues/5086). Firefox follows this rule. Therefore, all browsers render the following paragraph: - -````html - -```html -

日本語 English 汉语 한국어 漢語

- -

-```` - -as follows: - -```md -日本語 English 汉语 한국어 漢語 -``` - -However, Prettier has broken a line between Chinese/Japanese characters in Markdown for a long time, and between Chinese/Japanese and latin characters in some cases since 3.0.0. For example, the following Markdown paragraph: - -```md -日本語English汉语 -English -漢語 -``` - -is formatted as follows if `--prose-wrap` is set to the other value than `preserve` in Prettier 3.x: - -```md -日本語English汉语English漢語 -``` - -However, the following HTML, which is generated by a Markdown-to-HTML converter based on the above Markdown: - - -```html -

-日本語English汉语 -English -漢語 -

-``` - -is rendered as follows by all browsers: - -```md -日本語English汉语 English 漢語 -``` - -This is why we should stop Prettier from line breaking al so around Chinese/Japanese characters in Markdown. We are going to conform Prettier's behavior to this rule in a future version. After that, line breaks between Chinese/Japanese and others will be allowed again under certain rules. - -One of the few exceptions is spaces and line breaks between Chinese/Japanese and Korean letters. The following Markdown paragraphs are equivalent even in the current Prettier version: - -```md -현재 韓國의 大統領은 尹錫悅이다. -``` - -```md -현재 -韓國의 -大統領은 -尹錫悅이다. -``` - -You get the former if you format the latter with `--prose-wrap=always` and a sufficiently long `--print-width` value or with `--prose-wrap=never`, and you get the latter if you format the former with `--prose-wrap=always` with a extremely short `--print-width` value. Therefore, we do not have to touch such spaces and line breaks. - -Another exception is those between a Chinese/Japanese character and a meaningful symbol in Markdown like `*`, `` ` ``, `[`, and `]`. For example, the following Markdown paragraph is equivalent even in the current Prettier version: - -```md -**Yarn** のCLI経由でフォーマットするには `yarn prettier -w ` を実行してください。 -``` - -```md -**Yarn** -のCLI経由でフォーマットするには -`yarn prettier -w .` -を実行してください。 -``` - - -```md - -日本語 汉语 漢語 English 한국어 日本語 汉语 漢語 English 한국어 日本語 汉语 漢語 English 한국어 日本語 汉语 漢語 English 한국어 - -日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어 - - -日本語 汉语 漢語 -English 한국어 日本 -語 汉语 漢語 English -한국어 日本語 汉语 -漢語 English 한국어 -日本語 汉语 漢語 -English 한국어 - -日本語汉语漢語 -English한국어日本語 -汉语漢語 -English한국어日本語 -汉语漢語 -English한국어日本語 -汉语漢語 -English한국어 - - -日本語 汉语 漢語 English -한국어 -日本語 汉语 漢語 English -한국어 -日本語 汉语 漢語 English -한국어 -日本語 汉语 漢語 English -한국어 - -日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어 -``` diff --git a/changelog_unreleased/markdown/16816.md b/changelog_unreleased/markdown/16816.md deleted file mode 100644 index fce654466..000000000 --- a/changelog_unreleased/markdown/16816.md +++ /dev/null @@ -1,23 +0,0 @@ -#### Tell regexp-util to generate regex compatible with u flag (#16816 by @tats-u) - -CJK characters outside of BMP and Ideographic Variation Sequences (IVS; variation selectors dedicated for han/kanji), which consume 2 characters in JavaScript string, have not been treated as CJK. This is due to the fact that Prettier has not passed the appropriate flag `"u"` to the `regexp-util` package. - -In the following example, “𠮷” (U+20BB7) is out of BMP, and “葛󠄀” is a combination of a han “葛” (U+845B) in BMP and an IVS U+E0100. The latter requires a font with the support of Adobe Japan-1 (e.g. Yu Gothic UI and Source Han Sans) to be rendered as a form different from that of the character without IVS (葛). - - -```md - -a 字 a 字 a 字 -𠮷 -𠮷 -葛󠄀 -葛󠄀 -終 - - -a 字 a 字 a 字 𠮷 𠮷 葛󠄀 葛󠄀 終 - - -a 字 a 字 a 字𠮷𠮷葛󠄀葛󠄀終 - -``` diff --git a/changelog_unreleased/misc/15709.md b/changelog_unreleased/misc/15709.md deleted file mode 100644 index 20235d75f..000000000 --- a/changelog_unreleased/misc/15709.md +++ /dev/null @@ -1,5 +0,0 @@ -#### Fix `cursorOffset` feature sometimes being catastrophically slow (#15709 by @ExplodingCabbage) - -Previously, Prettier's `cursorOffset` feature would be spectacularly slow in certain unfortunate circumstances (namely when the user's cursor was not contained within a leaf node of the AST, and the non-leaf node containing it was very large and being significantly reformatted by Prettier). As a consequence, if you used Prettier via an editor integration that used `cursorOffset` under the hood, your editor would sometimes inexplicably hang when you tried to format a file. - -All examples of this phenomenon that we are aware of should now be fixed, but bug reports of any further pathological examples would be welcome. diff --git a/changelog_unreleased/scss/16607.md b/changelog_unreleased/scss/16607.md deleted file mode 100644 index b67ab6ba3..000000000 --- a/changelog_unreleased/scss/16607.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Fix error thrown when formatting SCSS file (#16607 by @fisker) - - -```scss -// Input -@if true { - $newKey: ($key: ( $theme-name: $value )) -} - -// Prettier stable -Error - -// Prettier main -@if true { - $newKey: ( - $key: - ( - $theme-name: $value, - ), - ); -} -``` diff --git a/changelog_unreleased/scss/16617.md b/changelog_unreleased/scss/16617.md deleted file mode 100644 index f95cde238..000000000 --- a/changelog_unreleased/scss/16617.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Fixed wrong trailing comma position after comment in SCSS (#16617 by @Ma-hawaj, @fisker) - - -```css -/* Input */ -$z-indexes: ( - header: 1035, - overlay: 1202 // TODO: change to 1050 after bootstrap modals will be removed -); - -/* Prettier stable */ -$z-indexes: ( - header: 1035, - overlay: 1202 // TODO: change to 1050 after bootstrap modals will be removed, -); - -/* Prettier main */ -$z-indexes: ( - header: 1035, - overlay: 1202, // TODO: change to 1050 after bootstrap modals will be removed -); -``` diff --git a/changelog_unreleased/typescript/16500-2.md b/changelog_unreleased/typescript/16500-2.md deleted file mode 100644 index 0349166dd..000000000 --- a/changelog_unreleased/typescript/16500-2.md +++ /dev/null @@ -1,16 +0,0 @@ -#### Add missing parentheses in tagged template literals (#16500 by @syi0808) - - -```jsx -// Input -(String?.raw!)``; -(String?.raw)!``; - -// Prettier stable -String?.raw!``; -String?.raw!``; - -// Prettier main -(String?.raw)!``; -(String?.raw)!``; -``` diff --git a/changelog_unreleased/typescript/16574.md b/changelog_unreleased/typescript/16574.md deleted file mode 100644 index ed79e8c5a..000000000 --- a/changelog_unreleased/typescript/16574.md +++ /dev/null @@ -1,35 +0,0 @@ -#### Preserve a comment on between decorator and modified parameter property (#16574 by @sosukesuzuki) - -The current version of Prettier unexpectedly moves a line comment between a parameter property modified by `readonly`, `private`, `public`, etc and a decorator. This output results in invalid TypeScript code. - -This change ensures that the original format is preserved. - - -```ts -// Input -class Foo { - constructor( - @decorator - // comment - readonly foo, - ) {} -} - -// Output (stable) -class Foo { - constructor( - @decorator - readonly // comment - foo, - ) {} -} - -// Output (main) -class Foo { - constructor( - @decorator - // comment - readonly foo, - ) {} -} -``` diff --git a/changelog_unreleased/typescript/16578.md b/changelog_unreleased/typescript/16578.md deleted file mode 100644 index 2250a06e3..000000000 --- a/changelog_unreleased/typescript/16578.md +++ /dev/null @@ -1,31 +0,0 @@ -#### Preserve a comment between modifier and the decorated property name (#16578 by @sosukesuzuki) - -There was a bug where block comments between the modifier and the name of a decorated property were being treated as trailing comments of the decorator. This behavior was not only unexpected but also lacked idempotency. - -With this change, the position of the block comment between the modifier and the property name is preserved. - - -```tsx -// Input -class Foo { - @decorator - readonly /* comment */ propertyName; -} - -// Prettier stable -class Foo { - @decorator /* comment */ - readonly propertyName; -} - -// Prettier stable (second output) -class Foo { - @decorator /* comment */ readonly propertyName; -} - -// Prettier main -class Foo { - @decorator - readonly /* comment */ propertyName; -} -``` diff --git a/changelog_unreleased/typescript/16586.md b/changelog_unreleased/typescript/16586.md deleted file mode 100644 index fad423933..000000000 --- a/changelog_unreleased/typescript/16586.md +++ /dev/null @@ -1,28 +0,0 @@ -#### Don't print an extra line break for arrow function with type parameter in assignment (#16586 by @sosukesuzuki) - -There was a bug where an extra line was inserted when assigning a chained arrow function with type parameters to a variable if there was a line comment above it. - -This change ensures that the extra line is no longer inserted. - - -```tsx -// Input -const foo1 = - // comment - () => () => 1; - -// Prettier stable -const foo1 = - // comment - - () => - () => - 1; - -// Prettier main -const foo1 = - // comment - () => - () => - 1; -``` diff --git a/changelog_unreleased/typescript/16729.md b/changelog_unreleased/typescript/16729.md deleted file mode 100644 index 515790d69..000000000 --- a/changelog_unreleased/typescript/16729.md +++ /dev/null @@ -1,13 +0,0 @@ -#### Support "Top-level await statements" (#16729 by @fisker) - - -```tsx -// Input -(await (await fetch()).json()).foo - -// Prettier stable -await(await fetch()).json().foo; - -// Prettier main -(await (await fetch()).json()).foo; -``` diff --git a/changelog_unreleased/typescript/16730.md b/changelog_unreleased/typescript/16730.md deleted file mode 100644 index 2e87cc2a6..000000000 --- a/changelog_unreleased/typescript/16730.md +++ /dev/null @@ -1,38 +0,0 @@ -#### Fix class heritage breaks even though it remains inside the line width (#16730 by @fisker) - - -```tsx -// Input -export class JiraCreatePixFraudDetectionGateway - implements Pick -{ - constructor(private readonly logger: Logger) { - this.logger = logger.child({ - context: JiraCreatePixFraudDetectionGateway.name, - }); - } -} - -// Prettier stable -export class JiraCreatePixFraudDetectionGateway - implements - Pick -{ - constructor(private readonly logger: Logger) { - this.logger = logger.child({ - context: JiraCreatePixFraudDetectionGateway.name, - }); - } -} - -// Prettier main -export class JiraCreatePixFraudDetectionGateway - implements Pick -{ - constructor(private readonly logger: Logger) { - this.logger = logger.child({ - context: JiraCreatePixFraudDetectionGateway.name, - }); - } -} -``` diff --git a/changelog_unreleased/typescript/16731.md b/changelog_unreleased/typescript/16731.md deleted file mode 100644 index 3b798eb2b..000000000 --- a/changelog_unreleased/typescript/16731.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Print `declare` before accessibility in class properties (#16731 by @fisker) - - -```tsx -// Input -class A { - declare private readonly name: string; -} - -// Prettier stable -class A { - private declare readonly name: string; -} - -// Prettier main -class A { - declare private readonly name: string; -} -``` diff --git a/changelog_unreleased/vue/16733.md b/changelog_unreleased/vue/16733.md deleted file mode 100644 index 8068d7e13..000000000 --- a/changelog_unreleased/vue/16733.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Fix extra semicolon inserted in Vue event binding with non-ascii characters (#16733 by @fisker) - - -```vue - - - - - - - - -``` diff --git a/changelog_unreleased/yaml/16489.md b/changelog_unreleased/yaml/16489.md deleted file mode 100644 index 53ab5c14c..000000000 --- a/changelog_unreleased/yaml/16489.md +++ /dev/null @@ -1,16 +0,0 @@ -#### Fix yaml comment in non-singleline items missing space before `#` (#16489 by @fyc09) - - -```yaml -# Input -123: # hello - # comment - -# Prettier stable -123:# hello - # comment - -# Prettier main -123: # hello - # comment -```