Skip to content

Commit ea90659

Browse files
committed
build(deps): bump napi to 3 in code-validator guest host
Bump napi and napi-derive together to v3 (they are version-coupled); napi-build stays at v2 (no v3 exists). No Rust code changes are needed — the 3.x API used by the host crate is source-compatible. napi-derive 3 makes `napi build` emit JSDoc into the generated src/code-validator/guest/host/index.d.ts, which is not Prettier-formatted. That file is a build artifact (the hand-written canonical types live in src/code-validator/guest/index.d.ts), so it is now gitignored and prettierignored, matching how other generated *.d.ts files are handled. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent bef708f commit ea90659

5 files changed

Lines changed: 19 additions & 14 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ plugins/plugin-schema-types.js
5454
plugins/host-modules.d.ts
5555
output-hyperagent-*/
5656
scripts/bash-bundle/_tmp_bundle.js
57+
58+
# Generated NAPI binding type declarations (emitted by `napi build`)
59+
src/code-validator/guest/host/index.d.ts

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Generated NAPI binding type declarations (emitted by `napi build`).
2+
# napi-derive >= 3 writes JSDoc into this file, which is not Prettier-formatted.
3+
# The canonical, hand-written types live in src/code-validator/guest/index.d.ts.
4+
src/code-validator/guest/host/index.d.ts

src/code-validator/guest/Cargo.lock

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/code-validator/guest/host/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ crate-type = ["cdylib", "rlib"]
1818
[dependencies]
1919
hyperlight-host = { workspace = true }
2020
napi = { version = "3", features = ["async", "napi6"] }
21-
napi-derive = "2"
21+
napi-derive = "3"
2222
sha2 = "0.11"
2323
hex = "0.4"
2424
base64 = "0.22"

src/code-validator/guest/host/index.d.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)