feat(node): align TypeScript SDK with Python and harden publishing#4035
feat(node): align TypeScript SDK with Python and harden publishing#4035aaronvg wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe pull request centralizes release platform configuration, adds verified Node.js package assembly and publishing, hardens Node bridge behavior, and expands Python/TypeScript SDK coverage with parity enforcement. ChangesRelease pipeline and contracts
Node runtime and generated bindings
SDK validation
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
Binary size checks passed✅ 7 passed
Generated by |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
baml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.ts (1)
122-164: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider using Vitest's
vi.stubEnvfor environment variable testing.Directly mutating
process.envand cleaning it up in atry...finallyblock is functionally correct. However, using Vitest's built-invi.stubEnvsimplifies the logic and provides better test hygiene out of the box.♻️ Proposed refactor for API key tests
it("test_extract_resume_build_request_includes_openai_api_key", () => { vi.stubEnv("OPENAI_API_KEY", "sk-openai-shorthand-test"); const request = lorem.ExtractResume$build_request("Some resume text"); expect(lowerCaseHeaders(request.headers).authorization).toBe( "Bearer sk-openai-shorthand-test", ); vi.unstubAllEnvs(); }); // Similarly apply this pattern to the other tests in this block.Note: You would also need to add
vito yourvitestimports at the top of the file:import { describe, expect, it, vi } from "vitest";🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.ts` around lines 122 - 164, Refactor the three API-key tests in the “llm_functions — shorthand client API keys” describe block to use Vitest’s vi.stubEnv and vi.unstubAllEnvs instead of direct process.env mutation and try/finally cleanup. Add vi to the existing Vitest import, and ensure each test restores stubbed environment variables after its assertions.baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_calls.test.ts (1)
219-223: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the inferred type binding, not only the returned value.
This test still passes if
GenericBox.new(5)loses its inferred metadata. Check$typesto cover the behavior named by the test.Proposed fix
expect(box).toBeInstanceOf(GenericBox); + expect(box.$types).toEqual({ T: "int" }); expect(box.value).toBe(5);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_calls.test.ts` around lines 219 - 223, Update the test_generic_static_infers_binding test to inspect GenericBox.$types and assert that the inferred type binding for the value is preserved, in addition to the existing instance and value assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build2-nodejs-sdk.reusable.yaml:
- Around line 248-251: Update the release-tool setup in the workflow around the
napi_version, attw_version, and napi pre-publish commands to use the
repository’s pnpm lockfile: add an explicit frozen pnpm install despite
install-dependencies being false, remove the global npm installation, and invoke
both `@napi-rs/cli` and `@arethetypeswrong/cli` through pnpm exec. Apply the same
pnpm exec usage at the additional tool invocation near the referenced later
section.
In @.github/workflows/publish2-nodejs-sdk.yaml:
- Around line 106-107: Update the release-plan validation step containing the
source_sha and channel checks to pass workflow inputs through the step
environment, then compare jq results against those environment variables. Remove
direct GitHub expression interpolation from the shell commands so
quote-containing inputs cannot alter shell syntax.
In
`@baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/cancellation.test.ts`:
- Around line 80-92: Update test_async_cancel_via_task_group_sibling to await
and assert the pending SleepMs_async promise rejects due to cancellation, rather
than relying only on Promise.all rejecting from failSoon. Preserve the expected
"cancel siblings" assertion for failSoon while avoiding the abort-before-reject
race, and verify the in-flight sibling does not complete normally.
In
`@baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/errors.test.ts`:
- Around line 164-169: Update the byte extraction logic around the source lookup
in the customizable errors test to match the complete new Uint8Array([...])
wrapper and capture only its array contents. Replace the separate open/close
index parsing with the matched byte-array content, then preserve the existing
numeric conversion into Uint8Array.
In `@baml_language/sdk_tests/crates/typescript_node/setup.sh`:
- Around line 60-63: Update the fixture iteration logic in setup.ps1 to mirror
the stale-fixture guard from setup.sh: derive fixture_name from the generated
directory and skip it when ../../fixtures/$fixture_name does not exist,
preventing installation of removed fixtures on Windows.
In `@release/platforms.json`:
- Around line 49-54: Update the node_build configuration for
aarch64-unknown-linux-musl to pin the downloaded aarch64-linux-musl-cross.tgz
archive with its SHA-256 checksum, store the expected digest in the release
contract, and validate the archive before the existing tar extraction runs.
In `@scripts/baml-release-manifests`:
- Around line 72-80: The release manifest generator must use the canonical
schema-2 plan loader before reading plan fields, replacing its local
schema/version checks with that validated result; update
scripts/baml-release-manifests lines 72-80 accordingly. Update
scripts/tests/test_baml_release_contract.py lines 218-224 to provide every
mandatory provenance field and values accepted by the canonical loader,
preserving the contract test’s existing purpose.
- Around line 82-94: Update the VSIX lookup before constructing the toolchain
manifest to target exactly baml-language-{version}.vsix in args.vsix_dir, rather
than selecting an arbitrary *.vsix via next and glob. Preserve the existing
missing-artifact SystemExit behavior and continue passing the exact artifact to
artifact_url and sha256.
---
Nitpick comments:
In
`@baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_calls.test.ts`:
- Around line 219-223: Update the test_generic_static_infers_binding test to
inspect GenericBox.$types and assert that the inferred type binding for the
value is preserved, in addition to the existing instance and value assertions.
In
`@baml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.ts`:
- Around line 122-164: Refactor the three API-key tests in the “llm_functions —
shorthand client API keys” describe block to use Vitest’s vi.stubEnv and
vi.unstubAllEnvs instead of direct process.env mutation and try/finally cleanup.
Add vi to the existing Vitest import, and ensure each test restores stubbed
environment variables after its assertions.
🪄 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: ebbb9e6f-21e2-45e4-be77-a22bb0d08eeb
⛔ Files ignored due to path filters (20)
baml_language/sdks/nodejs/bridge_nodejs/dist/define_function.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/define_function.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/define_function.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/define_function.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/errors.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/errors.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/errors.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/errors.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/host_value_registry.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/host_value_registry.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/host_value_registry.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/host_value_registry.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/index.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/index.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/index.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/index.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/proto.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/proto.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/proto.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/python/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (77)
.github/workflows/build2-nodejs-sdk.reusable.yaml.github/workflows/build2-python-sdk.reusable.yaml.github/workflows/ci.yaml.github/workflows/publish2-nodejs-sdk.yaml.github/workflows/release-baml-language.ymlbaml_language/crates/bex_engine/src/conversion.rsbaml_language/sdk_tests/DEVELOPMENT.mdbaml_language/sdk_tests/README.mdbaml_language/sdk_tests/crates/python_pydantic2/function_calls/customizable/test_errors.pybaml_language/sdk_tests/crates/python_pydantic2/function_calls/customizable/test_host_callables.pybaml_language/sdk_tests/crates/python_pydantic2/setup.shbaml_language/sdk_tests/crates/python_pydantic2/type_shapes/customizable/roundtrip_tests/test_media.pybaml_language/sdk_tests/crates/python_pydantic2/type_shapes/customizable/roundtrip_tests/test_primitives.pybaml_language/sdk_tests/crates/typescript_node/docstrings_etc/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/cancellation.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/errors.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_calls.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_inference.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/host_callables.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/language_specific/cancellation.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/language_specific/host_callables.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/language_specific/main.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/methods_on_classes.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/optional_args.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/raises.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/stdlib_entrypoints.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/union_throws.test.tsbaml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/streaming_e2e.test.tsbaml_language/sdk_tests/crates/typescript_node/setup.shbaml_language/sdk_tests/crates/typescript_node/src/lib.rsbaml_language/sdk_tests/crates/typescript_node/src/parity.rsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/language_specific/roundtrip_complex_models.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/language_specific/roundtrip_maps.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/language_specific/roundtrip_primitives.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_aliases.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_class_refs.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_complex_models.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_enums.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_forward_refs.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_generics.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_handles.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_lists.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_literals.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_maps.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_media.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_optional.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_primitives.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_recursion.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_routing.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_streams.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_symbol_collisions.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_unions.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_void.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/test_generic.test.tsbaml_language/sdk_tests/fixtures/function_calls/baml_src/ns_host_callable_tests/main.bamlbaml_language/sdk_tests/fixtures/function_calls/baml_src/ns_throws_test/types.bamlbaml_language/sdk_tests/fixtures/type_shapes/baml_src/ns_media/types.bamlbaml_language/sdk_tests/fixtures/type_shapes/baml_src/ns_primitives/types.bamlbaml_language/sdk_tests/harness_setup/src/lib.rsbaml_language/sdks/nodejs/bridge_nodejs/package.jsonbaml_language/sdks/nodejs/bridge_nodejs/tests/native_setup_errors.test.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/define_function.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/errors.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/host_value_registry.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/index.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.tsbaml_language/sdks/nodejs/sdkgen_typescript_node/src/leaf.rsbaml_language/sdks/nodejs/sdkgen_typescript_node/src/translate_ty.rsrelease/platforms.jsonscripts/baml-language-versionscripts/baml-release-manifestsscripts/baml-release-platformsscripts/tests/test_baml_release_contract.pyscripts/verify-node-release-package.mjs
💤 Files with no reviewable changes (1)
- baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/union_throws.test.ts
| fixture_name="${fixture_dir%/generated}" | ||
| # Ignore generated output left behind after a shared fixture is removed. | ||
| # Build.rs only refreshes fixtures that still exist under sdk_tests/fixtures. | ||
| [[ -d "../../fixtures/$fixture_name" ]] || continue |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
setup_ps1="$(fd -a '^setup\.ps1$' baml_language/sdk_tests/crates/typescript_node | head -n1)"
test -n "$setup_ps1" && rg -n -C4 'fixtures|generated|Test-Path' "$setup_ps1"Repository: BoundaryML/baml
Length of output: 847
🏁 Script executed:
#!/bin/bash
setup_ps1="$(fd -a '^setup\.ps1$' baml_language/sdk_tests/crates/typescript_node | head -n1)"
echo "setup_ps1=$setup_ps1"
if [ -n "$setup_ps1" ]; then
nl -ba "$setup_ps1" | sed -n '1,130p'
fiRepository: BoundaryML/baml
Length of output: 275
🏁 Script executed:
#!/bin/bash
setup_ps1="$(fd -a '^setup\.ps1$' baml_language/sdk_tests/crates/typescript_node | head -n1)"
if [ -n "$setup_ps1" ]; then
echo "=== fixture-related lines ==="
rg -n -C6 'fixture|fixtures|generated|Test-Path|Join-Path|Get-ChildItem' "$setup_ps1"
fiRepository: BoundaryML/baml
Length of output: 2657
Mirror the stale-fixture guard in setup.ps1 (lines 64-66). Add the ../../fixtures/$fixture_name existence check here too; otherwise Windows still installs generated dirs for fixtures that have been removed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@baml_language/sdk_tests/crates/typescript_node/setup.sh` around lines 60 -
63, Update the fixture iteration logic in setup.ps1 to mirror the stale-fixture
guard from setup.sh: derive fixture_name from the generated directory and skip
it when ../../fixtures/$fixture_name does not exist, preventing installation of
removed fixtures on Windows.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
baml_language/sdks/nodejs/sdkgen_typescript_node/src/leaf.rs (1)
638-657: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd a unit test for the type-alias descriptor output
Add an assertion for the newexport const {Name} = { typeAlias: ... } as const;line insrc/leaf.rsso the runtime descriptor shape stays locked down.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdks/nodejs/sdkgen_typescript_node/src/leaf.rs` around lines 638 - 657, Add a unit test covering render_type_alias that asserts the generated output includes the runtime descriptor line in the exact `export const {Name} = { typeAlias: ... } as const;` shape, using the source identifier expected for the alias. Keep the existing type-alias assertion and verify this descriptor output alongside it.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/wire_ty.ts`:
- Around line 212-227: Update outboundLiteral’s int handling to preserve wire
int64 values that exceed Number.MAX_SAFE_INTEGER as bigint literals instead of
converting them imprecisely or returning undefined. Use the existing
literalWireTy bigint representation and retain number output for safely
representable integers.
In `@baml_language/sdks/python/src/baml_bridge/proto.py`:
- Around line 475-483: Update the non-type fallback in the type conversion logic
to preserve parameterization: after resolving the alias name through
get_type_map().py_type_to_baml_type, populate ty.type_alias.type_args from
typing.get_args(py_type) before returning. Keep the existing alias-name
resolution and recursive-alias behavior unchanged for unparameterized aliases.
- Around line 468-473: The typing.Literal handling in the relevant type-encoding
function only supports one value and discards multi-value literals. Update the
origin is typing.Literal branch to encode each argument as a single-value
literal option in ty.union.options, reusing _fill_wire_literal for each arm,
while preserving the existing direct encoding for one value and unknown fallback
for unsupported cases.
---
Outside diff comments:
In `@baml_language/sdks/nodejs/sdkgen_typescript_node/src/leaf.rs`:
- Around line 638-657: Add a unit test covering render_type_alias that asserts
the generated output includes the runtime descriptor line in the exact `export
const {Name} = { typeAlias: ... } as const;` shape, using the source identifier
expected for the alias. Keep the existing type-alias assertion and verify this
descriptor output alongside it.
🪄 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: c77168dc-bd75-41a4-8d3a-c04bc46f7ff4
⛔ Files ignored due to path filters (11)
baml_language/sdks/nodejs/bridge_nodejs/dist/index.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/index.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/index.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/typemap.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/typemap.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/typemap.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/typemap.js.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/wire_ty.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/wire_ty.d.ts.mapis excluded by!**/dist/**,!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/dist/wire_ty.jsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/wire_ty.js.mapis excluded by!**/dist/**,!**/*.map
📒 Files selected for processing (13)
baml_language/sdk_tests/crates/python_pydantic2/function_calls/customizable/test_generic_calls.pybaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_calls.test.tsbaml_language/sdk_tests/fixtures/function_calls/baml_src/ns_generic_tests/types.bamlbaml_language/sdks/nodejs/bridge_nodejs/tests/test_wire_ty.test.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/index.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/typemap.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/wire_ty.tsbaml_language/sdks/nodejs/sdkgen_typescript_node/src/emit/type_alias.rsbaml_language/sdks/nodejs/sdkgen_typescript_node/src/leaf.rsbaml_language/sdks/python/src/baml_bridge/proto.pybaml_language/sdks/python/src/baml_bridge/typemap.pybaml_language/sdks/python/tests/test_proto_generics.pybaml_language/sdks/python/tests/test_typemap.py
🚧 Files skipped from review as they are similar to previous changes (2)
- baml_language/sdk_tests/crates/typescript_node/function_calls/customizable/generic_calls.test.ts
- baml_language/sdks/nodejs/bridge_nodejs/typescript_src/index.ts
What
Why
Python is the bridge completeness reference. TypeScript had gaps in both generated call forms and runtime value conversion, while the release workflow could publish an umbrella package before proving that its native dependencies were the exact expected artifacts.
The new shared tests make cross-language drift visible by requiring matching test IDs. JavaScript-only edge cases stay in language_specific so they test the Node representation boundary without forcing irrelevant behavior onto other bridges.
Important compatibility fixes
Validation
Note
High Risk
Changes span release publishing (integrity, tags, reruns), cross-platform CI matrices, and FFI type coercion at the engine boundary—any regression affects published npm artifacts or runtime call safety.
Overview
Aligns the TypeScript/Node SDK with Python through expanded Vitest coverage (errors, generics, inference, host callables, cancellation, raises/docstrings, LLM shorthand API keys) renamed to match Python
test_*IDs, plus a Rustpython_and_typescript_common_case_ids_match_by_fixtureratchet andlanguage_specific/for Node-only contracts. Python reference tests grow in parallel (media roundtrips, bigint, generic boxes, unsafe ints in errors/panics, callable class fields).Tightens FFI numeric safety in
coerce_numeric_to_declared_type: integral-looking floats no longer coerce into BAMLintslots (with engine unit tests).Overhauls Node SDK release CI: build matrices come from
release/platforms.jsonviabaml-release-platforms; workflows require frozenrelease_plan_jsonandsource_sha. Node build assembles, packs, checksums, and native-matrix smoke-tests exact tarballs before publish; publish consumesnodejs-verified-packages, publishes native leaves under an internal tag with integrity-aware idempotency, then the umbrella on the public channel, and adds post-publish registry install verification. Language release planning uses run-stable frozen plans, validates platforms, and feeds dynamic toolchain/wrapper matrices; manifests are generated from--plan release-plan.json.Reviewed by Cursor Bugbot for commit ea7ccbe. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit