* Migrate from Yarn to pnpm - Replace Yarn 4.0.2 with pnpm 10.29.3 as the package manager - Add pnpm-workspace.yaml and .npmrc configuration - Update all scripts to use pnpm commands - Rename getYarnWorkspaces() to getWorkspaces() in scripts/helpers.ts - Update CI workflow to use pnpm/action-setup@v4 with Node 22 - Add @jitl/tsconfig as root devDependency for proper resolution - Add variant packages as devDependencies for test resolution - Fix TypeScript 5.9 compatibility in memory.ts (Int32Array<ArrayBuffer>) - Upgrade typedoc to 0.28.17 for TypeScript 5.9 support - Upgrade typedoc-plugin-markdown to 4.10.0 - Regenerate documentation with new typedoc version * Clarify git commit --amend rule in CLAUDE.md * CI: Add --ignore-scripts to pnpm install Equivalent to yarn's YARN_ENABLE_SCRIPTS=0 - prevents prepare scripts from running during install, which would fail on a fresh checkout. * Fix pnpm tarball naming in smoketest scripts pnpm pack generates tarball names like jitl-quickjs-ffi-types-0.32.0.tgz (without @ prefix, with version) instead of @jitl-quickjs-ffi-types.tgz * Update examples to TypeScript 5.9 for compatibility The library now requires TypeScript 5.9+ due to stricter typed array generics (Int32Array<ArrayBuffer>). Update all TypeScript-using examples. * Use --legacy-peer-deps for create-react-app smoketest react-scripts@5 only supports TypeScript 3.x/4.x, but our library now requires TypeScript 5.9+ for typed array generics. Use --legacy-peer-deps to work around the peer dependency conflict. * Fix formatting issues * Fix remaining formatting issues * Add reminder to run prettier and lint before pushing * Document CI workflow in CLAUDE.md * Add typedoc.json and remark plugins for in-page table of contents - Add typedoc-plugin-remark, remark-toc, and remark-insert-headings - Configure remark plugins to generate "Contents" section for Class, Interface, Enum, TypeAlias, and Function pages - This restores the in-page TOC that lists methods/properties that was removed in typedoc-plugin-markdown 4.3.0 * Use custom remark plugin for headless TOC in docs Replace remark-insert-headings + remark-toc with a custom plugin that inserts the table of contents directly after the class description, without a separate "Contents" heading. * Revert to standard remark plugins for TOC with Contents heading Use remark-insert-headings + remark-toc instead of custom plugin. Remove mdast-util-toc dependency and custom remark-toc-headless.mjs. * Fix lockfile - remove mdast-util-toc * Ignore pnpm-lock.yaml in prettier, update .yarn to .pnpm --------- Co-authored-by: Hanzo Dev <[email protected]>
6.0 KiB
quickjs-emscripten / quickjs-emscripten-core / LowLevelJavascriptVm
Interface: LowLevelJavascriptVm<VmHandle>
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:53
A minimal interface to a Javascript execution environment.
Higher-level tools should build over the LowLevelJavascriptVm interface to share as much as possible between executors.
From https://www.figma.com/blog/how-we-built-the-figma-plugin-system/
Contents
Type Parameters
VmHandle
VmHandle
Properties
global
global:
VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:54
undefined
undefined:
VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:55
Methods
callFunction()
callFunction(
func,thisVal, ...args):VmCallResult<VmHandle>
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:76
Parameters
func
VmHandle
thisVal
VmHandle
args
...VmHandle[]
Returns
VmCallResult<VmHandle>
defineProp()
defineProp(
handle,key,descriptor):void
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:70
Parameters
handle
VmHandle
key
string | VmHandle
descriptor
VmPropertyDescriptor<VmHandle>
Returns
void
evalCode()
evalCode(
code,filename?):VmCallResult<VmHandle>
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:77
Parameters
code
string
filename?
string
Returns
VmCallResult<VmHandle>
getNumber()
getNumber(
handle):number
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:59
Parameters
handle
VmHandle
Returns
number
getProp()
getProp(
handle,key):VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:68
Parameters
handle
VmHandle
key
string | VmHandle
Returns
VmHandle
getString()
getString(
handle):string
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:60
Parameters
handle
VmHandle
Returns
string
newFunction()
newFunction(
name,value):VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:65
Parameters
name
string
value
VmFunctionImplementation<VmHandle>
Returns
VmHandle
newNumber()
newNumber(
value):VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:62
Parameters
value
number
Returns
VmHandle
newObject()
newObject(
prototype?):VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:64
Parameters
prototype?
VmHandle
Returns
VmHandle
newString()
newString(
value):VmHandle
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:63
Parameters
value
string
Returns
VmHandle
setProp()
setProp(
handle,key,value):void
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:69
Parameters
handle
VmHandle
key
string | VmHandle
value
VmHandle
Returns
void
typeof()
typeof(
handle):string
Defined in: packages/quickjs-emscripten-core/src/vm-interface.ts:57
Parameters
handle
VmHandle
Returns
string