Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/node/npm/wasm32-wasi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@napi-rs/wasm-runtime": "^1.1.1",
"@emnapi/core": "^1.8.1",
"@emnapi/runtime": "^1.8.1",
"@emnapi/runtime": "^1.9.2",
Comment on lines 31 to +32
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).

"@tybys/wasm-util": "^0.10.1",
"@emnapi/wasi-threads": "^1.1.0",
"tslib": "^2.8.1"
Expand Down
29 changes: 18 additions & 11 deletions pnpm-lock.yaml

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

Loading