Skip to content
Merged
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
11 changes: 0 additions & 11 deletions .changeset/async-array-mapping-fixes.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/seven-files-rest.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/sparse-fieldsets.md

This file was deleted.

33 changes: 33 additions & 0 deletions packages/bridge-compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# @stackables/bridge-compiler

## 2.1.0

### Minor Changes

- [#82](https://github.com/stackables/bridge/pull/82) [`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9) Thanks [@aarne](https://github.com/aarne)! - Add `requestedFields` option to `executeBridge()` for sparse fieldset filtering.

When provided, only the listed output fields (and their transitive tool dependencies) are resolved.
Tools that feed exclusively into unrequested fields are never called, reducing latency and upstream
bandwidth.

Supports dot-separated paths and a trailing wildcard (`["id", "price", "legs.*"]`).

### Patch Changes

- [`badbb78`](https://github.com/stackables/bridge/commit/badbb7859e270ea6c82ca8c4a5132f254fca9978) Thanks [@aarne](https://github.com/aarne)! - Fix three code generation bugs that caused `SyntaxError: await is only valid in async functions` when array mappings combined `catch` fallbacks or element-scoped tools with control flow.

- **Bug 1 – catch inside array `.map()`:** `needsAsync` only checked for element-scoped tool calls. Wires with `catch` fallbacks or `catch` control flow that fall back to an async IIFE now also trigger the async `for...of` loop path.

- **Bug 2 – element-scoped tool inside `.flatMap()`:** When a `?? continue` (or similar) control flow was detected first, the compiler unconditionally emitted `.flatMap()`. If the same loop also contained an element-scoped tool (`alias tool:iter`), the `await __call(...)` was placed inside a synchronous `.flatMap()` callback. `needsAsync` is now evaluated before the control-flow check, and when true, a `for...of` loop with a native `continue` statement is emitted instead.

- **Bug 3 – nested sub-array async blindspot:** The inner sub-array handler in `buildElementBody` never calculated `needsAsync`, always falling back to a synchronous `.map()`. It now uses the same async `for...of` IIFE pattern when inner wires contain element-scoped tools or catch expressions.

- [#84](https://github.com/stackables/bridge/pull/84) [`837ec1c`](https://github.com/stackables/bridge/commit/837ec1cc74c0a76e205d818b94c33b4c28e3628d) Thanks [@aarne](https://github.com/aarne)! - Fix several AOT compiler/runtime parity bugs discovered via fuzzing:

- Fix `condAnd` and `condOr` code generation to match runtime boolean semantics.
- Fix nullish fallback chaining so `??` handling matches runtime overdefinition boundaries.
- Fix overdefinition precedence so the first constant wire remains terminal, matching runtime behavior.
- Fix `serializeBridge` quoting for empty-string and slash-only string constants so parse/serialize/parse round-trips remain valid.
- Add deterministic regression coverage for these parity cases to prevent regressions.

- Updated dependencies [[`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]:
- @stackables/bridge-core@1.2.0

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackables/bridge-compiler",
"version": "2.0.0",
"version": "2.1.0",
"description": "Compiles a BridgeDocument into highly optimized JavaScript code",
"main": "./build/index.js",
"type": "module",
Expand Down
12 changes: 12 additions & 0 deletions packages/bridge-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @stackables/bridge-core

## 1.2.0

### Minor Changes

- [#82](https://github.com/stackables/bridge/pull/82) [`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9) Thanks [@aarne](https://github.com/aarne)! - Add `requestedFields` option to `executeBridge()` for sparse fieldset filtering.

When provided, only the listed output fields (and their transitive tool dependencies) are resolved.
Tools that feed exclusively into unrequested fields are never called, reducing latency and upstream
bandwidth.

Supports dot-separated paths and a trailing wildcard (`["id", "price", "legs.*"]`).

## 1.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackables/bridge-core",
"version": "1.1.1",
"version": "1.2.0",
"description": "Bridge runtime engine — execute pre-compiled bridge instructions",
"main": "./build/index.js",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions packages/bridge-graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @stackables/bridge-graphql

## 1.1.2

### Patch Changes

- Updated dependencies [[`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]:
- @stackables/bridge-core@1.2.0

## 1.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackables/bridge-graphql",
"version": "1.1.1",
"version": "1.1.2",
"description": "Bridge GraphQL adapter — wire bridges into a GraphQL schema",
"main": "./build/index.js",
"type": "module",
Expand Down
15 changes: 15 additions & 0 deletions packages/bridge-parser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @stackables/bridge-parser

## 1.1.1

### Patch Changes

- [#84](https://github.com/stackables/bridge/pull/84) [`837ec1c`](https://github.com/stackables/bridge/commit/837ec1cc74c0a76e205d818b94c33b4c28e3628d) Thanks [@aarne](https://github.com/aarne)! - Fix several AOT compiler/runtime parity bugs discovered via fuzzing:

- Fix `condAnd` and `condOr` code generation to match runtime boolean semantics.
- Fix nullish fallback chaining so `??` handling matches runtime overdefinition boundaries.
- Fix overdefinition precedence so the first constant wire remains terminal, matching runtime behavior.
- Fix `serializeBridge` quoting for empty-string and slash-only string constants so parse/serialize/parse round-trips remain valid.
- Add deterministic regression coverage for these parity cases to prevent regressions.

- Updated dependencies [[`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]:
- @stackables/bridge-core@1.2.0

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackables/bridge-parser",
"version": "1.1.0",
"version": "1.1.1",
"description": "Bridge DSL parser — turns .bridge text into a BridgeDocument (AST)",
"main": "./build/index.js",
"type": "module",
Expand Down
9 changes: 9 additions & 0 deletions packages/bridge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @stackables/bridge

## 2.1.3

### Patch Changes

- Updated dependencies [[`837ec1c`](https://github.com/stackables/bridge/commit/837ec1cc74c0a76e205d818b94c33b4c28e3628d), [`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]:
- @stackables/bridge-parser@1.1.1
- @stackables/bridge-core@1.2.0
- @stackables/bridge-graphql@1.1.2

## 2.1.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackables/bridge",
"version": "2.1.2",
"version": "2.1.3",
"description": "Declarative dataflow for GraphQL",
"main": "./build/index.js",
"type": "module",
Expand Down
Loading