Packages

@emnapi/core

1.11.3 · 25 Jul 2026MIT92.4M / weekRepositoryHomepagenpmAtom feed

Your version

0.32.2

25 Feb 2023Where it was published

0.45.0 is the newest release of 0.32.x.

In short

1 fixed1 changed

Release note

  • Fix SyntaxError when using keywords as name

  • Prebuild libemnapi-basic.a (exclude napi_*_{async_work,threadsafe_function}) and implement async work in single thread

Breaking Change

(non-emscripten) Now napiModule.init receive an object as first parameter and require a WebAssembly.Module in module field.

before:

import { createNapiModule } from '@emnapi/core'

const napiModule = createNapiModule({ /* ... */ })
WebAssembly.instantiate(/* ... */).then(({ instance }) => {
  const binding = napiModule.init(instance, memory, table)
})

after:

import { createNapiModule } from '@emnapi/core'

const napiModule = createNapiModule({ /* ... */ })
WebAssembly.instantiate(/* ... */).then(({ instance, module }) => {
  const binding = napiModule.init({
    instance,
    module,
    memory,
    table
  })
})

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.