Skip to content

Commit

Permalink
chore: bump package versions to 0.1.19-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rycont committed Dec 6, 2024
1 parent caf137e commit 907cf6c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"name": "@yaksok-ts/core",
"version": "0.1.18",
"version": "0.1.19-alpha.1",
"exports": "./src/mod.ts",
"nodeModulesDir": "auto",
"workspace": [
Expand Down
10 changes: 10 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion quickjs/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"quickjs-emscripten": "npm:quickjs-emscripten@^0.31.0",
"quickjs-emscripten-core": "npm:quickjs-emscripten-core@^0.31.0"
},
"version": "0.1.18"
"version": "0.1.19-alpha.1"
}
28 changes: 15 additions & 13 deletions runtest.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import { QuickJS } from '@yaksok-ts/quickjs'
import { yaksok } from '@yaksok-ts/core'
import { NumberValue } from './src/node/primitive.ts'

const quickjs = new QuickJS({
prompt,
})
await quickjs.init()
console.time('실행')

yaksok(
await yaksok(
`
번역(QuickJS), (질문) 물어보기
번역(Runtime), (숫자)초 기다리기
***
return prompt(질문)
wait
***
입력받은_이름: "이름이 뭐에요?" 물어보기
입력받은_이름 + "님 안녕하세요!" 보여주기
"안녕!" 보여주기
1초 기다리기
"반가워!" 보여주기
`,
{
runFFI(r, code, args) {
const result = quickjs.run(code, args)
return result
async runFFI(_runtime, _code, args) {
await new Promise((ok) =>
setTimeout(ok, (args.숫자 as NumberValue).value * 1000),
)

return new NumberValue(0)
},
},
)
console.timeEnd('실행')

0 comments on commit 907cf6c

Please sign in to comment.