oxc/crates
overlookmotel 8d237c49a9 fix(transformer): JSX source calculate correct column when Unicode chars (#3615)
Fix column number in JSX source transform, and add tests.

It was correct in all cases, except for when a Unicode character with code point above `0xFFFF` appears earlier on the line.

Such characters are:

* 4 bytes in UTF-8.
* 2 characters in UTF-16.
* 1 `char` in Rust.

Babel (which we're trying to match) uses count of UTF-16 characters for column number, whereas we were using count of Rust `char`s.
2024-06-11 06:41:18 +00:00
..
oxc Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_allocator Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_ast refactor(transformer): move BoundIdentifier into helpers (#3610) 2024-06-11 06:41:11 +00:00
oxc_ast_macros Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_codegen refactor(linter): add rule fixer (#3589) 2024-06-10 17:20:14 +08:00
oxc_diagnostics Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_index Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_js_regex chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_language_server refactor(transformer): replace &’a Trivias with Rc<Trivias> (#3580) 2024-06-11 13:23:41 +08:00
oxc_linter refactor(transformer): replace &’a Trivias with Rc<Trivias> (#3580) 2024-06-11 13:23:41 +08:00
oxc_macros chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_minifier refactor(minifier): make Prepass Copy (#3603) 2024-06-10 11:17:45 +00:00
oxc_module_lexer Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_parser Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_prettier chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_semantic refactor(traverse): generate_uid_in_root_scope method (#3611) 2024-06-11 06:41:12 +00:00
oxc_sourcemap Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_span fix(transformer): do not add __source for generated nodes (#3614) 2024-06-11 06:41:16 +00:00
oxc_syntax Release crates v0.13.5 (#3584) 2024-06-08 16:44:50 +08:00
oxc_transformer fix(transformer): JSX source calculate correct column when Unicode chars (#3615) 2024-06-11 06:41:18 +00:00
oxc_traverse refactor(traverse): generate_uid_in_root_scope method (#3611) 2024-06-11 06:41:12 +00:00
oxc_wasm refactor(transformer): replace &’a Trivias with Rc<Trivias> (#3580) 2024-06-11 13:23:41 +08:00