Closed mlejva closed 3 months ago
Currently, we're a bit naive when detecting a language runtime. We only detect if it's a browser or Node.
The platform library we're using isn't able to detect well other runtimes besides Node
platform
Relevant code: https://github.com/e2b-dev/E2B/blob/bd3b5b9f9b6ce847ebfeb8bf8b60a3268be17c84/packages/js-sdk/src/api/metadata.ts#L10 https://github.com/e2b-dev/E2B/blob/bd3b5b9f9b6ce847ebfeb8bf8b60a3268be17c84/packages/js-sdk/src/api/metadata.ts#L13
Describe the solution you'd like We should be able to detect at least Node, Deno, and Bun.
Fixed on beta branch during ensuring compatibility with Deno and Bun.
beta
Currently, we're a bit naive when detecting a language runtime. We only detect if it's a browser or Node.
The
platform
library we're using isn't able to detect well other runtimes besides NodeRelevant code: https://github.com/e2b-dev/E2B/blob/bd3b5b9f9b6ce847ebfeb8bf8b60a3268be17c84/packages/js-sdk/src/api/metadata.ts#L10 https://github.com/e2b-dev/E2B/blob/bd3b5b9f9b6ce847ebfeb8bf8b60a3268be17c84/packages/js-sdk/src/api/metadata.ts#L13
Describe the solution you'd like We should be able to detect at least Node, Deno, and Bun.