Skip to content

Commit f16e512

Browse files
authored
Merge branch 'main' into permissions-calling-run_code-as-a-different-user-e2b-2123
2 parents 38ee9c7 + c6dd986 commit f16e512

File tree

29 files changed

+3045
-496
lines changed

29 files changed

+3045
-496
lines changed

js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@e2b/code-interpreter",
3-
"version": "1.1.1",
3+
"version": "1.5.0",
44
"packageManager": "[email protected]",
55
"description": "E2B Code Interpreter - Stateful code execution",
66
"homepage": "https://e2b.dev",
@@ -66,7 +66,7 @@
6666
"vm"
6767
],
6868
"dependencies": {
69-
"e2b": "^1.2.3"
69+
"e2b": "^1.4.0"
7070
},
7171
"engines": {
7272
"node": ">=18"

js/tests/defaultKernels.test.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ import { expect } from 'vitest'
33
import { sandboxTest } from './setup'
44

55
sandboxTest('test js kernel', async ({ sandbox }) => {
6-
const output = await sandbox.runCode('console.log("Hello World!")', { language: 'js' })
6+
const output = await sandbox.runCode('console.log("Hello World!")', {
7+
language: 'js',
8+
})
79
expect(output.logs.stdout).toEqual(['Hello World!\n'])
810
})
11+
12+
sandboxTest('test ts kernel', async ({ sandbox }) => {
13+
const output = await sandbox.runCode(
14+
'const message: string = "Hello World!"; console.log(message)',
15+
{ language: 'ts' }
16+
)
17+
expect(output.logs.stdout).toEqual(['Hello World!\n'])
18+
})
19+
20+
sandboxTest('test ts kernel errors', async ({ sandbox }) => {
21+
const output = await sandbox.runCode('import x from "module";', {
22+
language: 'typescript',
23+
})
24+
expect(output.error?.name).toEqual('TypeScriptCompilerError')
25+
})

js/tsup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'tsup'
22

33
export default defineConfig({
44
minify: false,
5-
target: ['es2015'],
5+
target: ['es2017'],
66
sourcemap: true,
77
dts: true,
88
format: ['esm', 'cjs'],

js/vitest.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default defineConfig({
1616
globals: false,
1717
testTimeout: 30000,
1818
environment: 'node',
19-
bail: 1,
19+
bail: 0,
2020
server: {},
2121
deps: {
2222
interopDefault: true,

0 commit comments

Comments
 (0)