replit / desktop

Replit Desktop App
114 stars 3 forks source link

Pass process.platform down to renderer process #100

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

If we ever want to do anything OS-specific on the web side (for example, prompt Linux users to download the latest client), it's necessary to know which platform we're on. While we can potentially infer that from the user agent, I'd rather this be an explicit part of the API for ease of use and consistency (on the off-chance the heuristic we use differs from what Node uses).

What changed

Pass process.platform down to renderer process as a new platform field on the global replitDesktop object

Test plan