Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Treat U+30A0 & U+30FB in Katakana Block as CJK#16796

Merged
fisker merged 7 commits intoprettier:mainfrom
tats-u:nakaten
Nov 26, 2024
Merged

Treat U+30A0 & U+30FB in Katakana Block as CJK#16796
fisker merged 7 commits intoprettier:mainfrom
tats-u:nakaten

Conversation

Copy link
Contributor

tats-u commented Oct 28, 2024 *
edited
Loading

Description

From: #15081

Prettier doesn't treat U+30A0 & U+30FB as Japanese.
They're not included in scx=Katakana.

ikatyang-collab/cjk-regex#189
ikatyang-collab/cjk-regex#190

https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDdACVHDaIYAW3AAXYB0p9jTCSyrKLzBvhhoJABoQIAHGAS2gGdkoVACdhEAO4AFEQgEpUAG3GoAngLYAjYajABrODADKqALZwAMtyhxkAM0V84m7XoOGOOqwHNkMYQFcnEEcTbl8AoLgADw44YW4zWEUAFTioEW44OXsFRzY+bwU4AEV-CHg7ByCAKz4ow0KSsoqkHLyQAEdmuEkxDjk0PgBaazgAE3HWED9UbgVvAGEIExNUZDQFBSmCqC8igEEYP24Nf3hJOMtrStyggAsYEwUAdTvueD4PMDhDWXfuABu7xU6zAfHUIABgQAklAJrBDGB4lx9nDDDAVEUbu0OGJHM9tBx1oplGoplZHMIYL1UF5Vtigh5hJT1qthLoxhIoFNhHAutxeTS6WtWlU2DBUBpntwxjA7sgAExsfyOZKS7JikBwEwacYTMbmVC7fy0uAAMQgwlWR28xLOECmuKsMGlsvlSAVAAYAL7eoA

Firefox treats them as a part of CJ.

https://codepen.io/tats-u/pen/wvVxrVj

A space would be inserted if they were not treated as non-CJ.

Checklist

  • I've added tests to confirm my change works.
  • (If changing the API or CLI) I've documented the changes I've made (in the docs/ directory).
  • (If the change is user-facing) I've added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I've read the contributing guidelines.

Try the playground for this PR

tats-u marked this pull request as draft October 28, 2024 11:11
tats-u force-pushed the nakaten branch from 5773d1a to ff9e36b Compare November 4, 2024 08:13
tats-u added 2 commits November 4, 2024 18:05
tats-u changed the title Treat U+30A0 & U+30FB in Kataka Block as CJK Treat U+30A0 & U+30FB in Katakana Block as CJK Nov 4, 2024
tats-u marked this pull request as ready for review November 4, 2024 09:35
fisker reviewed Nov 26, 2024
unicodeRegex({
Block: ["Katakana"],
}),
),
Copy link
Member

fisker Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work?

const cjkCharset = new Charset(
getCjkCharset(),
unicodeRegex({
Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
General_Category: [
"Other_Letter",
"Letter_Number",
"Other_Symbol",
"Modifier_Letter",
"Modifier_Symbol",
"Nonspacing_Mark",
],
// Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
Block: ["Katakana"],
}),
);

Copy link
Contributor Author

tats-u Nov 26, 2024 *
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

node --experimental-require-module
Welcome to Node.js v22.11.0.
Type ".help" for more information.
> (node:33040) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{ all: getCjkCharset } = require("cjk-regex")
[Module: null prototype] {
all: [Function: all],
letters: [Function: letters],
punctuations: [Function: punctuations]
}
> { Charset } = require("regexp-util")
[Module: null prototype] {
Base: [class Base],
Charset: [class Charset extends Base],
Or: [class Or extends Base],
charset: [Function: charset],
concat: [Function: concat],
optional: [Function: optional],
or: [Function: or],
repeat: [Function: repeat],
wrap: [Function: wrap]
}
> unicodeRegex = require("unicode-regex").default
[Function: unicode]
> const cjkCharset = new Charset(
... getCjkCharset(),
... unicodeRegex({
... Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
... General_Category: [
... "Other_Letter",
... "Letter_Number",
... "Other_Symbol",
... "Modifier_Letter",
... "Modifier_Symbol",
... "Nonspacing_Mark",
... ],
... // Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
... Block: ["Katakana"],
... }),
... );
undefined
> cjkCharset.
cjkCharset.__proto__ cjkCharset.hasOwnProperty cjkCharset.isPrototypeOf cjkCharset.propertyIsEnumerable
cjkCharset.toLocaleString cjkCharset.valueOf

cjkCharset.isEmpty cjkCharset.toRegExp cjkCharset.toString

cjkCharset._isEmpty cjkCharset._toString cjkCharset._unique cjkCharset.constructor
cjkCharset.intersect cjkCharset.subtract cjkCharset.union

cjkCharset.data

> cjkCharset.
cjkCharset.__proto__ cjkCharset.hasOwnProperty cjkCharset.isPrototypeOf cjkCharset.propertyIsEnumerable
cjkCharset.toLocaleString cjkCharset.valueOf

cjkCharset.isEmpty cjkCharset.toRegExp cjkCharset.toString

cjkCharset._isEmpty cjkCharset._toString cjkCharset._unique cjkCharset.constructor
cjkCharset.intersect cjkCharset.subtract cjkCharset.union

cjkCharset.data

> cjkCharset.toRegExp("u")
/[\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{309d}-\u{309f}\u{30a1}-\u{30fa}\u{30fc}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}]/u
> cjkCharset.toRegExp("u").test("*")
false

Copy link
Contributor Author

tats-u Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c.f.

node --experimental-require-module
Welcome to Node.js v22.11.0.
Type ".help" for more information.
> (node:27776) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{ all: getCjkCharset } = require("cjk-regex")
[Module: null prototype] {
all: [Function: all],
letters: [Function: letters],
punctuations: [Function: punctuations]
}
> { Charset } = require("regexp-util")
[Module: null prototype] {
Base: [class Base],
Charset: [class Charset extends Base],
Or: [class Or extends Base],
charset: [Function: charset],
concat: [Function: concat],
optional: [Function: optional],
or: [Function: or],
repeat: [Function: repeat],
wrap: [Function: wrap]
}
> unicodeRegex = require("unicode-regex").default
[Function: unicode]
> const cjkCharset = new Charset(
... getCjkCharset(),
... unicodeRegex({
... Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
... General_Category: [
... "Other_Letter",
... "Letter_Number",
... "Other_Symbol",
... "Modifier_Letter",
... "Modifier_Symbol",
... "Nonspacing_Mark",
... ],
... }).union(
... // Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
... unicodeRegex({
... Block: ["Katakana"],
... }),
... ),
... );
undefined
> cjkCharset.toRegExp("u").test("*")
true

Copy link
Contributor Author

tats-u Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> c = unicodeRegex({
... Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
... General_Category: [
... "Other_Letter",
... "Letter_Number",
... "Other_Symbol",
... "Modifier_Letter",
... "Modifier_Symbol",
... "Nonspacing_Mark",
... ],
... // Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
... Block: ["Katakana"],
... })
Charset { data: [ [ 12449, 12538 ], [ 12540, 12543 ] ] }
> ["a","a", "Zi ","*"].map(s => c.toRegExp("u").test(s))
[ false, true, false, false ]

fisker and bnunruh reacted with thumbs up emoji
fisker approved these changes Nov 26, 2024
fisker merged commit ac46a4f into prettier:main Nov 26, 2024
tats-u deleted the nakaten branch November 26, 2024 21:30
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull request Dec 4, 2024
##### [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 6, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 7, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 8, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 10, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 11, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 12, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
OCram85 pushed a commit to OCram85/arkanum that referenced this pull request Dec 12, 2024
This PR contains the following updates:

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

---

### Release Notes


prettier/prettier (prettier)

### [`v3.4.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[Compare Source](prettier/prettier@3.4.1...3.4.2)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#​16796](prettier/prettier#16796) by [@​tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#​16891](prettier/prettier#16891) by [@​fisker](https://github.com/fisker))



```jsx
// Input
class A {
@​decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@​decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@​decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#​16899](prettier/prettier#16899) by [@​seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```



---

### Configuration

**Schedule**: Branch creation - At any time (no schedule defined), 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 [Renovate Bot](https://github.com/renovatebot/renovate).


Reviewed-on: https://gitea.ocram85.com/arkanum/arkanum/pulls/151
Co-authored-by: renovate-bot
Co-committed-by: renovate-bot
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 14, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 15, 2024
| datasource | package | from | to |
| ---------- | -------- | ----- | ----- |
| npm | prettier | 3.4.1 | 3.4.2 |


## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker))



```jsx
// Input
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```
prettier deleted a comment from bnunruh Mar 11, 2025
prettier deleted a comment from bnunruh Mar 11, 2025
prettier deleted a comment from bnunruh Mar 11, 2025
prettier deleted a comment from bnunruh Mar 18, 2025
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Jul 4, 2025
...fleeting-plugin-hetzner!256)

This MR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | `3.3.3` -> `3.6.2` | [![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.3.3/3.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes


prettier/prettier (prettier)

### [`v3.6.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#362)

[Compare Source](prettier/prettier@3.6.1...3.6.2)

[diff](prettier/prettier@3.6.1...3.6.2)

##### Markdown: Add missing blank line around code block ([#​17675](prettier/prettier#17675) by [@​fisker](https://github.com/fisker))



````md

1. Some text, and code block below, with newline after code block

```yaml
---
foo: bar
```

1. Another
2. List


1. Some text, and code block below, with newline after code block

```yaml
---
foo: bar
```
1. Another
2. List


1. Some text, and code block below, with newline after code block

```yaml
---
foo: bar
```

1. Another
2. List
````

### [`v3.6.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#361)

[Compare Source](prettier/prettier@3.6.0...3.6.1)

[diff](prettier/prettier@3.6.0...3.6.1)

##### TypeScript: Allow const without initializer ([#​17650](prettier/prettier#17650), [#​17654](prettier/prettier#17654) by [@​fisker](https://github.com/fisker))



```jsx
// Input
export const version: string;

// Prettier 3.6.0 (--parser=babel-ts)
SyntaxError: Unexpected token (1:21)
> 1 | export const version: string;
| ^

// Prettier 3.6.0 (--parser=oxc-ts)
SyntaxError: Missing initializer in const declaration (1:14)
> 1 | export const version: string;
| ^^^^^^^^^^^^^^^

// Prettier 3.6.1
export const version: string;
```

##### Miscellaneous: Avoid closing files multiple times ([#​17665](prettier/prettier#17665) by [@​43081j](https://github.com/43081j))

When reading a file to infer the interpreter from a shebang, we use the
`n-readlines` library to read the first line in order to get the shebang.

This library closes files when it reaches EOF, and we later try close the same
files again. We now close files only if `n-readlines` did not already close
them.

### [`v3.6.0`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#360)

[Compare Source](prettier/prettier@3.5.3...3.6.0)

[diff](prettier/prettier@3.5.3...3.6.0)

[Release Notes](https://prettier.io/blog/2025/06/23/3.6.0)

### [`v3.5.3`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#353)

[Compare Source](prettier/prettier@3.5.2...3.5.3)

[diff](prettier/prettier@3.5.2...3.5.3)

##### Flow: Fix missing parentheses in `ConditionalTypeAnnotation` ([#​17196](prettier/prettier#17196) by [@​fisker](https://github.com/fisker))



```jsx
// Input
type T = 'a' | ('b' extends U ? 'c' : empty);
type T = 'a' & ('b' extends U ? 'c' : empty);

// Prettier 3.5.2
type T = "a" | "b" extends U ? "c" : empty;
type T = "a" & "b" extends U ? "c" : empty;

// Prettier 3.5.3
type T = "a" | ("b" extends U ? "c" : empty);
type T = "a" & ("b" extends U ? "c" : empty);
```

### [`v3.5.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[Compare Source](prettier/prettier@3.5.1...3.5.2)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#​17156](prettier/prettier#17156) by [@​fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), so that `require("prettier")` can use ESM version, but turns out it doesn't work if CommonJS and ESM plugins both imports builtin plugins. To solve this problem, we decide simply remove the `module-sync` condition, so `require("prettier")` will still use the CommonJS version, we'll revisit until `require(ESM)` feature is more stable.

### [`v3.5.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#351)

[Compare Source](prettier/prettier@3.5.0...3.5.1)

[diff](prettier/prettier@3.5.0...3.5.1)

##### Fix CLI crash when cache for old version exists ([#​17100](prettier/prettier#17100) by [@​sosukesuzuki](https://github.com/sosukesuzuki))

Prettier 3.5 uses a different cache format than previous versions, Prettier 3.5.0 crashes when reading existing cache file, Prettier 3.5.1 fixed the problem.

##### Support dockercompose and github-actions-workflow in VSCode ([#​17101](prettier/prettier#17101) by [@​remcohaszing](https://github.com/remcohaszing))

Prettier now supports the `dockercompose` and `github-actions-workflow` languages in Visual Studio Code.

### [`v3.5.0`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#350)

[Compare Source](prettier/prettier@3.4.2...3.5.0)

[diff](prettier/prettier@3.4.2...3.5.0)

[Release Notes](https://prettier.io/blog/2025/02/09/3.5.0.html)

### [`v3.4.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[Compare Source](prettier/prettier@3.4.1...3.4.2)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#​16796](prettier/prettier#16796) by [@​tats-u](https://github.com/tats-u))

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or "and". The following "CYan Yu *C++*Go*Rust" means "C language & C++ & Go & Rust" in Japanese.



```md


CYan
Yu
*
C++
*
Go
*
Rust


CYan Yu * C++ * Go * Rust


CYan Yu *C++*Go*Rust
```

U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. "Saint-Saens" (Charles Camille Saint-Saens) can be represented as "san=sa-nsu" in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. "san=sa-nsu" or "san=sa-nsu").

##### Fix comments print on class methods with decorators ([#​16891](prettier/prettier#16891) by [@​fisker](https://github.com/fisker))



```jsx
// Input
class A {
@​decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.1
class A {
@​decorator
async /**
* The method description
*
*/
method(foo: Foo, bar: Bar) {
console.log(foo);
}
}

// Prettier 3.4.2
class A {
@​decorator
/**
* The method description
*
*/
async method(foo: Foo, bar: Bar) {
console.log(foo);
}
}
```

##### Fix non-idempotent formatting ([#​16899](prettier/prettier#16899) by [@​seiyab](https://github.com/seiyab))

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.



```jsx
// Input

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.1 (first)

foo

longlonglonglonglonglonglonglonglonglonglonglonglonglonglong l foo
, abc
;

// Prettier 3.4.1 (second)

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;

// Prettier 3.4.2

foo
longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
, abc
;
```

### [`v3.4.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#341)

[Compare Source](prettier/prettier@3.4.0...3.4.1)

[diff](prettier/prettier@3.4.0...3.4.1)

##### Remove unnecessary parentheses around assignment in `v-on` ([#​16887](prettier/prettier#16887) by [@​fisker](https://github.com/fisker))



```vue








```

### [`v3.4.0`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#340)

[Compare Source](prettier/prettier@3.3.3...3.4.0)

[diff](prettier/prettier@3.3.3...3.4.0)

[Release Notes](https://prettier.io/blog/2024/11/26/3.4.0.html)



---

### Configuration

**Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

**Automerge**: Enabled.

**Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

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

---

- [ ] If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

fisker fisker approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants