Skip to content

Update @emnapi/runtime 1.8.1 → 1.9.2 (minor)#19971

Open
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/@emnapi/runtime-1.9.2
Open

Update @emnapi/runtime 1.8.1 → 1.9.2 (minor)#19971
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/@emnapi/runtime-1.9.2

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu Bot commented Apr 24, 2026

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ @​emnapi/runtime (1.8.1 → 1.10.0) · Repo

Release Notes

1.10.0

What's Changed

  • fix: early update wasm memory for views (https://github.com/hardfist/emnapi-shared-memory-grow-repro)
  • fix!: napi_adjust_external_memory no longer grow wasm memory
  • fix: add missing from64 wrap
  • fix: coalesce tsfn (js version) send message
  • ci: restructure CI workflows
  • ci: prebuilt liraries using llvm 22

Thanks @hardfist

Full Changelog: v1.9.2...v1.10.0

1.9.2

What's Changed

Full Changelog: v1.9.1...v1.9.2

1.9.1

fix for emscripten 5.0.3
emscripten-core/emscripten@3051725

Full Changelog: v1.9.0...v1.9.1

1.9.0

What's Changed

  • fix data race and use-after-free in napi_threadsafe_function by @toyobayashi in #199
    • fix tsfn not work in JS based async_work workers
    • fix pthread_create not work in JS based async_work workers
    • emnapi_basic[-mt].a includes libuv symbols now
  • refactor: dispatch async work queue in shared memory by @toyobayashi in #200
    • Avoids deadlock when main thread block on waiting queued async work starting. Completed work can not be dispatched to main thread that cause no new worker available, then queued work never start.
    • wasm32-wasip1-threads target spawn async worker in JS will use pthread_create, no longer maintain a separate worker pool.
  • rename node_api_create_object_with_properties by @toyobayashi in #193
  • fix: execute tsfn finalizer after queue drains when aborted
  • feat: add required config hint in package entry
    const { requiredConfig } = require('emnapi')
    console.log(requiredConfig.clang.wasmld)
    [
      '--import-memory',
      '--shared-memory',
      '--export-table',
      '--export=malloc',
      '--export=free',
      '--export=napi_register_wasm_v1',
      '--export-if-defined=node_api_module_get_api_version_v1',
      '--export=emnapi_thread_crashed',
      '--export-if-defined=emnapi_async_worker_create',
      '--export-if-defined=emnapi_async_worker_init'
    ]
    

Full Changelog: v1.8.1...v1.9.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 22 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu Bot requested a review from a team as a code owner April 24, 2026 20:00
@depfu depfu Bot added the depfu label Apr 24, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Walkthrough

Updates the @emnapi/runtime dependency version in the WebAssembly package configuration from ^1.8.1 to ^1.9.2. This is a single-line change in the package.json file that modifies only this specific dependency version constraint. No other dependencies or package configurations are affected by this update.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the dependency version update from 1.8.1 to 1.9.2 for @emnapi/runtime, which is the main change in the changeset.
Description check ✅ Passed The description provides comprehensive release notes and commit information for the @emnapi/runtime update, directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/node/npm/wasm32-wasi/package.json`:
- Around line 31-32: Update the emnapi core dependency version to match the
runtime: change "@emnapi/core": "^1.8.1" to "@emnapi/core": "^1.9.2" in
package.json so both companion packages use the same ^1.9.2 version (ensure
package.json entry for "@emnapi/core" is updated and run your package manager to
install/lock the new version).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 50481dd1-a3df-4f35-98f4-60ef45a851ad

📥 Commits

Reviewing files that changed from the base of the PR and between 3a890c3 and bce93cb.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • crates/node/npm/wasm32-wasi/package.json

Comment on lines 31 to +32
"@emnapi/core": "^1.8.1",
"@emnapi/runtime": "^1.8.1",
"@emnapi/runtime": "^1.9.2",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check available versions and peer dependencies for emnapi packages

echo "=== `@emnapi/runtime` versions ==="
npm view `@emnapi/runtime`@1.9.2 peerDependencies
npm view `@emnapi/runtime`@1.9.2 dependencies | grep -i emnapi || echo "No emnapi dependencies"

echo -e "\n=== `@emnapi/core` latest versions ==="
npm view `@emnapi/core` versions --json | jq -r '.[-5:]'

echo -e "\n=== Check if `@emnapi/core` 1.8.1 is compatible with `@emnapi/runtime` 1.9.2 ==="
npm view `@emnapi/core`@1.8.1 version

Repository: tailwindlabs/tailwindcss

Length of output: 1814


🌐 Web query:

@emnapi/runtime 1.9.2 peer dependencies compatibility

💡 Result:

For @emnapi/runtime v1.9.2, there is no peerDependency declared by the package itself. It depends only on tslib, while peer-dependency compatibility is enforced by downstream packages that require matching @emnapi/core and @emnapi/runtime versions. What’s in @emnapi/runtime@1.9.2 - Package metadata for @emnapi/runtime (including v1.9.2) shows only a dependency on tslib; no peerDependencies are listed. Compatibility expectations (what to align in your project) - If you’re using @napi-rs/wasm-runtime, it declares peerDependencies on: - @emnapi/core: ^1.7.1 - @emnapi/runtime: ^1.7.1 This means @emnapi/runtime@1.9.2 satisfies the peer range. But you should also use a compatible @emnapi/core version (ideally 1.9.2) to avoid version-mismatch checks. - The napi-rs project added/uses version-sync logic to ensure the installed @emnapi package version matches the installed @emnapi/core and @emnapi/runtime versions used during WASM build/package generation, and it notes the move of @emnapi/core and @emnapi/runtime to peerDependencies for wasm-runtime. Practical answer - You can typically pair @emnapi/runtime@1.9.2 with @napi-rs/wasm-runtime (>=1.0.0 and peer range ^1.7.1) as long as your @emnapi/core version is within the expected major line (and preferably the same version, e.g. core@1.9.2). If you tell me which package(s) you’re integrating (e.g., @napi-rs/wasm-runtime, @napi-rs/wasm-tools, emnapi itself, or another wrapper), I can map the exact peer ranges and what versions to install together.

Citations:


🌐 Web query:

@emnapi/core @emnapi/runtime version compatibility issues

💡 Result:

There are no known version compatibility issues between @emnapi/core and @emnapi/runtime. The official emnapi documentation explicitly states: "Each package should match the same version." Both packages follow the same versioning scheme (e.g., latest versions are both 1.10.0 as of April 2026), with synchronized releases from the monorepo at https://github.com/toyobayashi/emnapi. They are designed to be used together at identical versions for Node-API (NAPI) implementations in WebAssembly environments like Emscripten, wasi-sdk, and clang wasm32. Reported issues primarily involve: - Mismatched versions in transitive dependencies (e.g., Next.js/Sharp pulling older @emnapi/runtime@1.5.0). - Runtime errors from version mismatches in prebuilt WASM addons (e.g., linking against emnapi v1.8.1 causing "Cannot read properties of undefined (reading 'whenLoaded')"). To avoid issues: - Install matching versions: npm install @emnapi/core@1.10.0 @emnapi/runtime@1.10.0 - Use npm ls to verify no extraneous/mismatched installations. - Pin exact versions in package.json (avoid ^/~ ranges for these packages). - For Emscripten builds, ensure compatible flags like -pthread for threaded APIs. No peerDependencies are declared between the packages; compatibility is maintained via parallel releases and the monorepo structure.

Citations:


🌐 Web query:

emnapi packages changelog release notes 1.8.1 1.9.2

💡 Result:

emnapi (toyobayashi/emnapi) release notes / changelog items for versions 1.8.1 and 1.9.2: 1) v1.8.1 (published 2026-01-04) - The emnapi repo lists tags/releases for v1.8.1, but the captured sources in this research run did not include the v1.8.1 release page’s “What’s Changed” / changelog text. So I can’t reliably quote the specific changes for 1.8.1 from the evidence collected. 2) v1.9.2 (published 2026-04-02) - fix: allow maximum memory 4GB (PR #205).

Citations:


Align @emnapi/core with @emnapi/runtime version.

The update to @emnapi/runtime@^1.9.2 creates a version mismatch with @emnapi/core@^1.8.1. While technically compatible within peer ranges, official emnapi documentation explicitly recommends matching versions for these companion packages to prevent runtime issues. Update @emnapi/core to ^1.9.2 to align with the runtime version.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/node/npm/wasm32-wasi/package.json` around lines 31 - 32, Update the
emnapi core dependency version to match the runtime: change "@emnapi/core":
"^1.8.1" to "@emnapi/core": "^1.9.2" in package.json so both companion packages
use the same ^1.9.2 version (ensure package.json entry for "@emnapi/core" is
updated and run your package manager to install/lock the new version).

@depfu
Copy link
Copy Markdown
Contributor Author

depfu Bot commented Apr 24, 2026

Sorry, but the merge failed with:

At least 1 approving review is required by reviewers with write access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants