-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
ts.convertToBase64
does not handle emojis
#49150
Comments
AFAIK this is only used to encode source map contents, which themselves cannot contain emoji. Switching these to a non-ordinal iteration is definitely going to make it slower -- without a concrete upside (or if I'm wrong about how this is called), I think this is a Won't Fix |
Reading the inbound link, I'm guessing I'm wrong about whether sourcemaps can contain emoji |
We used implementation of |
By the way, when running on Node it uses |
Gotcha, we can make the fallback implementation as slow as needed |
I'm looking for everyone who's patching typescript in prep for TS 5.0 (where that sort of thing breaks), and found this issue via deno's code. @dsherret Can you instead provide |
@jakebailey we do provide |
I'm confused; https://github.com/denoland/deno/blob/main/cli/tsc/99_main_compiler.js#L822 appears to be patching TypeScript at runtime (and links back here). |
That being said, we now emit ES2018, so, maybe there's an efficient way to do this now anyhow. |
Then again, there's also a |
We don't use typescript for source maps anymore so we don't need that. I've been meaning to delete that code.
I've also been meaning to discuss about this, but I've been too busy. (For the future: Essentially we have a fork of TS to make npm specifiers workβwe have multiple |
Ah, cool; just wanted to make sure that you weren't runtime patching and got surprised when 5.0 caused that to throw (since ESM exports can't be modified externally, bundler or not). Aside, but, if you are already using a fork, hopefully TS is a little more buildable for your uses now with some modification; you should be able to get pure ESM out of it. Might allow some tree shaking, but, probably not too much yet. |
I opened denoland/deno#17862 to remove its use. Yeah, don't worry about Deno too much because I can work around the TS codebase ok then hopefully over time can work on getting anything upstreamed. (In ts-morph though I'd rather not have to modify the ts source... I have this file with all the internal stuff I use: https://github.com/dsherret/ts-morph/blob/latest/packages/common/src/typescript/tsInternal.ts) |
Please do send issues for APIs you think should be public; we already made public quite a few others in 5.0. |
Sorry for the confusion! I missed that we no longer use TSC for emitting source maps. |
@jakebailey thanks! If they are going away then maybe I will try again (#21021) π |
Bug Report
TypeScript/src/compiler/utilities.ts
Line 5244 in da00ba6
π Search Terms
π Version & Regression Information
Probably a long time.
β― Playground Link
N/A
π» Code
π Actual behavior
π Expected behavior
The text was updated successfully, but these errors were encountered: