Migrate wire shape to unified fallbacks array#98
Merged
aarne merged 6 commits intowire_fix99from Mar 5, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: f248857 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
… tests Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bridge | f248857 | Commit Preview URL Branch Preview URL |
Mar 05 2026, 08:10 PM |
…] pattern Replace old separate falsyFallback, falsyFallbackRefs properties with the unified fallbacks array in test assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace all separate falsyFallback*/nullishFallback* properties across ~13 locations in parser.ts with a single fallbacks: WireFallback[] array. Also update bridge-format.ts serializer and export WireFallback from bridge-core. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lbacks array Update bridge-compiler codegen.ts and related test files to use the new Wire.fallbacks?: WireFallback[] property instead of the old separate falsyFallback/nullishFallback/falsyControl/nullishControl/falsyFallbackRefs/ nullishFallbackRefs properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update fallback logic to unify falsy and nullish handling
Migrate wire shape to unified fallbacks array
Mar 5, 2026
Contributor
aarne
added a commit
that referenced
this pull request
Mar 5, 2026
* Fix multi ?? * Migrate wire shape to unified fallbacks array (#98) * Initial plan * Migrate Wire type to unified fallbacks array, update runtime and gate tests Co-authored-by: aarne <82001+aarne@users.noreply.github.com> * Update resilience test assertions to use new fallbacks: WireFallback[] pattern Replace old separate falsyFallback, falsyFallbackRefs properties with the unified fallbacks array in test assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refactor parser to use unified fallbacks: WireFallback[] pattern Replace all separate falsyFallback*/nullishFallback* properties across ~13 locations in parser.ts with a single fallbacks: WireFallback[] array. Also update bridge-format.ts serializer and export WireFallback from bridge-core. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Migrate codegen from separate falsy/nullish properties to unified fallbacks array Update bridge-compiler codegen.ts and related test files to use the new Wire.fallbacks?: WireFallback[] property instead of the old separate falsyFallback/nullishFallback/falsyControl/nullishControl/falsyFallbackRefs/ nullishFallbackRefs properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add mixed wire chain tests, playground example, and changeset Co-authored-by: aarne <82001+aarne@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aarne <82001+aarne@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: aarne <82001+aarne@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the separate
falsyFallback/falsyFallbackRefs/falsyControl/nullishFallback/nullishFallbackRefs/nullishControlproperties onWirewith a single orderedfallbacks: WireFallback[]array. This enables mixing||and??operators in any order within a single wire expression.Type system (
bridge-core)WireFallbackinterface, replaced 6 per-variant fallback properties withfallbacks?: WireFallback[]resolveWires.ts: CollapsedapplyFalsyGate+applyNullishGateintoapplyFallbackGates— iterates array left-to-right, checking gate type per entrytree-utils.ts: SimplifiedgetSimplePullReffast-path to!w.fallbacks?.lengthParser (
bridge-parser)coalesceChainItemgrammar rule wrapping|| altand?? altinto a singleOR, replacing the two separateMANYblocks that forced all||before all??fallbacks[]preserving authored interleavingfallbacks[], emitting||or??based ontypeCompiler (
bridge-compiler)applyFallbacksmethod iteratesw.fallbackssequentially, emitting||or??JS operators per entryTests
applyFallbackGateswith 5 new mixed-chain casesfallbacksarray shapeOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.