Skip to content

Commit 03c5430

Browse files
chore: update versions
1 parent b213e9f commit 03c5430

20 files changed

Lines changed: 215 additions & 99 deletions

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

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

.changeset/fifty-cases-rhyme.md

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

.changeset/many-beds-like.md

Lines changed: 0 additions & 5 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: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# @stackables/bridge-compiler
22

3+
## 2.4.0
4+
5+
### Minor Changes
6+
7+
- [#104](https://github.com/stackables/bridge/pull/104) [`b213e9f`](https://github.com/stackables/bridge/commit/b213e9f49ed5da80e7d9a1b9e161586e59b3719c) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Multi-Level Control Flow (break N, continue N)
8+
9+
When working with deeply nested arrays (e.g., mapping categories that contain lists of products), you may want an error deep inside the inner array to skip the outer array element.
10+
11+
You can append a number to break or continue to specify how many loop levels the signal should pierce.
12+
13+
### Patch Changes
14+
15+
- [#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
16+
17+
AOT-compiled bridges now throw `BridgeTimeoutError` (with the same name and
18+
message format as the runtime) when a tool exceeds `toolTimeoutMs`. Previously
19+
the generated code constructed a generic `Error`, causing a class mismatch when
20+
callers caught and inspected the error type.
21+
22+
- [#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
23+
24+
**bridge-core:**
25+
26+
- `catch` gate now correctly recovers with an explicit `null` fallback value.
27+
Previously, `if (recoveredValue != null)` caused the catch gate to rethrow
28+
the original error when the fallback resolved to `null`; changed to
29+
`!== undefined` so `null` is treated as a valid recovered value.
30+
31+
- Element refs (array-mapping `el.field` references) are now null-safe during
32+
path traversal. When an array element is `null` or `undefined`, the runtime
33+
returns `undefined` instead of throwing `TypeError`, matching AOT-generated
34+
code which uses optional chaining on element accesses.
35+
36+
- Array-mapping fields (`resolveNestedField`) now return `null` when the
37+
resolved source value is not an array, instead of returning the raw value
38+
unchanged. This aligns with AOT behavior and makes non-array source handling
39+
consistent.
40+
41+
**bridge-compiler:**
42+
43+
- AOT-generated code now respects `rootSafe` / `pathSafe` flags on input refs,
44+
using strict property access (`["key"]`) instead of optional chaining
45+
(`?.["key"]`) for non-safe segments. Previously all input-ref segments used
46+
optional chaining regardless of flags, silently swallowing TypeErrors that
47+
the runtime would throw.
48+
49+
- Array-mapping expressions now guard the source with `Array.isArray` before
50+
calling `.map` / `.flatMap`. Previously, a non-array non-null source
51+
(e.g. a string) would cause a `TypeError` in the generated code while the
52+
runtime returned `null`.
53+
54+
- Updated dependencies [[`b213e9f`](https://github.com/stackables/bridge/commit/b213e9f49ed5da80e7d9a1b9e161586e59b3719c), [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]:
55+
- @stackables/bridge-core@1.5.0
56+
- @stackables/bridge-stdlib@1.5.2
57+
358
## 2.3.0
459

560
### 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.4.0",
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: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,70 @@
11
# @stackables/bridge-core
22

3+
## 1.5.0
4+
5+
### Minor Changes
6+
7+
- [#104](https://github.com/stackables/bridge/pull/104) [`b213e9f`](https://github.com/stackables/bridge/commit/b213e9f49ed5da80e7d9a1b9e161586e59b3719c) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Multi-Level Control Flow (break N, continue N)
8+
9+
When working with deeply nested arrays (e.g., mapping categories that contain lists of products), you may want an error deep inside the inner array to skip the outer array element.
10+
11+
You can append a number to break or continue to specify how many loop levels the signal should pierce.
12+
13+
- [#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
14+
15+
Tools can now attach a `.bridge` property to declare how the engine should
16+
instrument them, imported as `ToolMetadata` from `@stackables/bridge`.
17+
18+
```ts
19+
import type { ToolMetadata } from "@stackables/bridge";
20+
21+
myTool.bridge = {
22+
trace: false, // skip OTel span for this tool
23+
log: {
24+
execution: "info", // log successful calls at info level
25+
errors: "error", // log failures at error level (default)
26+
},
27+
} satisfies ToolMetadata;
28+
```
29+
30+
### Patch Changes
31+
32+
- [#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
33+
34+
**bridge-core:**
35+
36+
- `catch` gate now correctly recovers with an explicit `null` fallback value.
37+
Previously, `if (recoveredValue != null)` caused the catch gate to rethrow
38+
the original error when the fallback resolved to `null`; changed to
39+
`!== undefined` so `null` is treated as a valid recovered value.
40+
41+
- Element refs (array-mapping `el.field` references) are now null-safe during
42+
path traversal. When an array element is `null` or `undefined`, the runtime
43+
returns `undefined` instead of throwing `TypeError`, matching AOT-generated
44+
code which uses optional chaining on element accesses.
45+
46+
- Array-mapping fields (`resolveNestedField`) now return `null` when the
47+
resolved source value is not an array, instead of returning the raw value
48+
unchanged. This aligns with AOT behavior and makes non-array source handling
49+
consistent.
50+
51+
**bridge-compiler:**
52+
53+
- AOT-generated code now respects `rootSafe` / `pathSafe` flags on input refs,
54+
using strict property access (`["key"]`) instead of optional chaining
55+
(`?.["key"]`) for non-safe segments. Previously all input-ref segments used
56+
optional chaining regardless of flags, silently swallowing TypeErrors that
57+
the runtime would throw.
58+
59+
- Array-mapping expressions now guard the source with `Array.isArray` before
60+
calling `.map` / `.flatMap`. Previously, a non-array non-null source
61+
(e.g. a string) would cause a `TypeError` in the generated code while the
62+
runtime returned `null`.
63+
64+
- Updated dependencies [[`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]:
65+
- @stackables/bridge-stdlib@1.5.2
66+
- @stackables/bridge-types@1.1.0
67+
368
## 1.4.0
469

570
### 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",

0 commit comments

Comments
 (0)