+
Skip to content

Conversation

siketyan
Copy link
Member

Summary

These two characters have been added to the ID_Continue property in Unicode 15.1, but they're not supported in ECMAScript. To avoid an syntax error, Biome will omit these on checking if a character is in ID_Continue.

  • U+30FB KATAKANA MIDDLE DOT
  • U+FF65 HALFWIDTH KATAKANA MIDDLE DOT

Test Plan

Added a snapshot test.

Docs

N/A

@siketyan siketyan requested review from a team August 28, 2025 16:14
@siketyan siketyan self-assigned this Aug 28, 2025
Copy link

changeset-bot bot commented Aug 28, 2025

🦋 Changeset detected

Latest commit: 35a3e23

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Aug 28, 2025

Walkthrough

Adds a patch changeset for @biomejs/biome documenting a bug fix: U+30FB (KATAKANA MIDDLE DOT) and U+FF65 (HALFWIDTH KATAKANA MIDDLE DOT) are no longer treated as JS identifier-continue characters, so property keys containing them are preserved as string literals. Adds a formatter test with such keys and updates is_js_id_continue in biome_unicode_table to explicitly reject those two code points. No public APIs changed.

Suggested labels

A-Formatter, L-JavaScript, A-Core, A-Parser

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c6f4aa7 and 35a3e23.

⛔ Files ignored due to path filters (1)
  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/clever-worlds-heal.md (1 hunks)
  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js (1 hunks)
  • crates/biome_unicode_table/src/lib.rs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/clever-worlds-heal.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js
  • crates/biome_unicode_table/src/lib.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: autofix
  • GitHub Check: Check Dependencies
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test Node.js API
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Aug 28, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
.changeset/clever-worlds-heal.md (1)

5-5: Tighten wording and make JS scope explicit; add example per guidelines.

Minor grammar, explicit “JavaScript identifier-continue”, and clearer behaviour statement.

Apply this diff to reword the description:

-Fixed [#7261](https://github.com/biomejs/biome/issues/7261): two characters `・` (KATAKANA MIDDLE DOT, U+30FB) and `・` (HALFWIDTH KATAKANA MIDDLE DOT, U+FF65) are no longer considered as valid characters. A string literal property key including these character(s) is now preserved as-is.
+Fixed [#7261](https://github.com/biomejs/biome/issues/7261). Do not treat U+30FB (KATAKANA MIDDLE DOT, `・`) and U+FF65 (HALFWIDTH KATAKANA MIDDLE DOT, `・`) as JavaScript identifier-continue characters. Property keys containing these characters are preserved as string literals.

Suggested representative example for the changeset body (not a diff):

// Input
({ "実用文・会話文": "長文読解" });

// Output (unchanged)
({ "実用文・会話文": "長文読解" });
crates/biome_unicode_table/src/lib.rs (2)

68-70: Prefer code point match to avoid look‑alike glyph confusion.

Sticks with the file’s existing matches! style and is crystal clear in reviewers’ editors.

-    if c == '・' || c == '・' {
-        return false;
-    }
+    if matches!(c as u32, 0x30FB | 0xFF65) {
+        return false;
+    }

63-73: Add a focused unit test in this crate.

A tiny crate-level test will catch regressions even if formatter behaviour changes.

Proposed test file (crates/biome_unicode_table/tests/js_id_continue.rs):

use biome_unicode_table::is_js_id_continue;

#[test]
fn rejects_katakana_middle_dot_variants() {
    assert!(!is_js_id_continue('・')); // U+30FB
    assert!(!is_js_id_continue('・')); // U+FF65
}

#[test]
fn still_allows_common_continue_chars() {
    assert!(is_js_id_continue('0'));
    assert!(is_js_id_continue('_'));
    assert!(is_js_id_continue('$'));
}
crates/biome_js_formatter/tests/specs/js/module/object/property_key.js (1)

8-10: Also cover the HALFWIDTH variant (U+FF65).

You cover U+30FB; add U+FF65 to lock both down.

  // https://github.com/biomejs/biome/issues/7261
  "実用文・会話文": "長文読解",
+ // Also cover U+FF65 HALFWIDTH KATAKANA MIDDLE DOT.
+ "実用文・会話文": "長文読解",
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4a2bd2f and c6f4aa7.

⛔ Files ignored due to path filters (1)
  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/clever-worlds-heal.md (1 hunks)
  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js (1 hunks)
  • crates/biome_unicode_table/src/lib.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/*.md: Create changesets with just new-changeset; store them in .changeset/ with correct frontmatter (package keys and change type).
In changeset descriptions, follow content conventions: user-facing changes only; past tense for what you did; present tense for current behavior; link issues for fixes; link rules/assists; include representative code blocks; end every sentence with a period.
When adding headers in a changeset, only use #### or ##### levels.

Files:

  • .changeset/clever-worlds-heal.md
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js
  • crates/biome_unicode_table/src/lib.rs
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_js_formatter/tests/specs/js/module/object/property_key.js
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Format Rust and TOML files before committing (use just f/just format).

Files:

  • crates/biome_unicode_table/src/lib.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
🔇 Additional comments (2)
.changeset/clever-worlds-heal.md (1)

1-3: Frontmatter looks correct.

Package and bump type are properly declared.

crates/biome_unicode_table/src/lib.rs (1)

64-71: Good defensive guard against Unicode 15.1 drift.

Early-returning for U+30FB and U+FF65 keeps behaviour aligned with ECMAScript regardless of ID_Continue updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages

Projects

None yet

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载