Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun.Transpiler improperly transpile some string symbol into different encodings #17961

Open
snowfluke opened this issue Mar 7, 2025 · 0 comments
Labels
bug Something isn't working bun.js Something to do with a Bun-specific API confirmed bug We can reproduce this issue transpiler parser || printer

Comments

@snowfluke
Copy link

What version of Bun is running?

1.2.4+fd9a5ea66

What platform is your computer?

Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Write a transpile.ts file:

const transpiler = new Bun.Transpiler({
  loader: "ts",
  target: "node",
});

Bun.file("./index.ts")
  .text()
  .then((buf) => {
    transpiler.transform(buf).then((res) => console.log(res));
  });

And a index.ts file:

let list = ["•", "-", "◦", "▪", "▫"];

What is the expected behavior?

it should transpile:

let list = ["•", "-", "◦", "▪", "▫"];

What do you see instead?

let list = ["â¢", "-", "â¦", "âª", "â«"];

Additional information

No response

@snowfluke snowfluke added bug Something isn't working needs triage labels Mar 7, 2025
@RiskyMH RiskyMH added transpiler parser || printer bun.js Something to do with a Bun-specific API confirmed bug We can reproduce this issue and removed needs triage labels Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bun.js Something to do with a Bun-specific API confirmed bug We can reproduce this issue transpiler parser || printer
Projects
None yet
Development

No branches or pull requests

2 participants