Skip to content

Commit 6323a2a

Browse files
chore: update versions
1 parent fc6c619 commit 6323a2a

18 files changed

Lines changed: 189 additions & 83 deletions

File tree

.changeset/aot-timeout-error-class.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.changeset/runtime-parity-fixes.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

.changeset/stdlib-type-guard-fixes.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/tool-metadata.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/bridge-compiler/CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# @stackables/bridge-compiler
22

3+
## 2.3.1
4+
5+
### Patch Changes
6+
7+
- [#103](https://github.com/stackables/bridge/pull/103) [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60) Thanks [@aarne](https://github.com/aarne)! - Fix AOT compiler to throw `BridgeTimeoutError` on tool timeout
8+
9+
AOT-compiled bridges now throw `BridgeTimeoutError` (with the same name and
10+
message format as the runtime) when a tool exceeds `toolTimeoutMs`. Previously
11+
the generated code constructed a generic `Error`, causing a class mismatch when
12+
callers caught and inspected the error type.
13+
14+
- [#103](https://github.com/stackables/bridge/pull/103) [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60) Thanks [@aarne](https://github.com/aarne)! - Fix AOT/runtime parity for null element traversal, catch-null recovery, and non-array source handling
15+
16+
**bridge-core:**
17+
18+
- `catch` gate now correctly recovers with an explicit `null` fallback value.
19+
Previously, `if (recoveredValue != null)` caused the catch gate to rethrow
20+
the original error when the fallback resolved to `null`; changed to
21+
`!== undefined` so `null` is treated as a valid recovered value.
22+
23+
- Element refs (array-mapping `el.field` references) are now null-safe during
24+
path traversal. When an array element is `null` or `undefined`, the runtime
25+
returns `undefined` instead of throwing `TypeError`, matching AOT-generated
26+
code which uses optional chaining on element accesses.
27+
28+
- Array-mapping fields (`resolveNestedField`) now return `null` when the
29+
resolved source value is not an array, instead of returning the raw value
30+
unchanged. This aligns with AOT behavior and makes non-array source handling
31+
consistent.
32+
33+
**bridge-compiler:**
34+
35+
- AOT-generated code now respects `rootSafe` / `pathSafe` flags on input refs,
36+
using strict property access (`["key"]`) instead of optional chaining
37+
(`?.["key"]`) for non-safe segments. Previously all input-ref segments used
38+
optional chaining regardless of flags, silently swallowing TypeErrors that
39+
the runtime would throw.
40+
41+
- Array-mapping expressions now guard the source with `Array.isArray` before
42+
calling `.map` / `.flatMap`. Previously, a non-array non-null source
43+
(e.g. a string) would cause a `TypeError` in the generated code while the
44+
runtime returned `null`.
45+
46+
- Updated dependencies [[`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]:
47+
- @stackables/bridge-core@1.5.0
48+
- @stackables/bridge-stdlib@1.5.2
49+
350
## 2.3.0
451

552
### Minor Changes

packages/bridge-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-compiler",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "Compiles a BridgeDocument into highly optimized JavaScript code",
55
"main": "./build/index.js",
66
"type": "module",

packages/bridge-core/CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# @stackables/bridge-core
22

3+
## 1.5.0
4+
5+
### Minor Changes
6+
7+
- [#100](https://github.com/stackables/bridge/pull/100) [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac) Thanks [@aarne](https://github.com/aarne)! - Add `ToolMetadata` — per-tool observability controls
8+
9+
Tools can now attach a `.bridge` property to declare how the engine should
10+
instrument them, imported as `ToolMetadata` from `@stackables/bridge`.
11+
12+
```ts
13+
import type { ToolMetadata } from "@stackables/bridge";
14+
15+
myTool.bridge = {
16+
trace: false, // skip OTel span for this tool
17+
log: {
18+
execution: "info", // log successful calls at info level
19+
errors: "error", // log failures at error level (default)
20+
},
21+
} satisfies ToolMetadata;
22+
```
23+
24+
### Patch Changes
25+
26+
- [#103](https://github.com/stackables/bridge/pull/103) [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60) Thanks [@aarne](https://github.com/aarne)! - Fix AOT/runtime parity for null element traversal, catch-null recovery, and non-array source handling
27+
28+
**bridge-core:**
29+
30+
- `catch` gate now correctly recovers with an explicit `null` fallback value.
31+
Previously, `if (recoveredValue != null)` caused the catch gate to rethrow
32+
the original error when the fallback resolved to `null`; changed to
33+
`!== undefined` so `null` is treated as a valid recovered value.
34+
35+
- Element refs (array-mapping `el.field` references) are now null-safe during
36+
path traversal. When an array element is `null` or `undefined`, the runtime
37+
returns `undefined` instead of throwing `TypeError`, matching AOT-generated
38+
code which uses optional chaining on element accesses.
39+
40+
- Array-mapping fields (`resolveNestedField`) now return `null` when the
41+
resolved source value is not an array, instead of returning the raw value
42+
unchanged. This aligns with AOT behavior and makes non-array source handling
43+
consistent.
44+
45+
**bridge-compiler:**
46+
47+
- AOT-generated code now respects `rootSafe` / `pathSafe` flags on input refs,
48+
using strict property access (`["key"]`) instead of optional chaining
49+
(`?.["key"]`) for non-safe segments. Previously all input-ref segments used
50+
optional chaining regardless of flags, silently swallowing TypeErrors that
51+
the runtime would throw.
52+
53+
- Array-mapping expressions now guard the source with `Array.isArray` before
54+
calling `.map` / `.flatMap`. Previously, a non-array non-null source
55+
(e.g. a string) would cause a `TypeError` in the generated code while the
56+
runtime returned `null`.
57+
58+
- Updated dependencies [[`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]:
59+
- @stackables/bridge-stdlib@1.5.2
60+
- @stackables/bridge-types@1.1.0
61+
362
## 1.4.0
463

564
### Minor Changes

packages/bridge-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-core",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"description": "Bridge runtime engine — execute pre-compiled bridge instructions",
55
"main": "./build/index.js",
66
"type": "module",

packages/bridge-graphql/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @stackables/bridge-graphql
22

3+
## 1.1.5
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]:
8+
- @stackables/bridge-core@1.5.0
9+
- @stackables/bridge-stdlib@1.5.2
10+
311
## 1.1.4
412

513
### Patch Changes

packages/bridge-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-graphql",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "Bridge GraphQL adapter — wire bridges into a GraphQL schema",
55
"main": "./build/index.js",
66
"type": "module",

0 commit comments

Comments
 (0)