Skip to content

Release core v0.16.1#58

Merged
fazzatti merged 248 commits intomainfrom
dev
Mar 5, 2026
Merged

Release core v0.16.1#58
fazzatti merged 248 commits intomainfrom
dev

Conversation

@fazzatti
Copy link
Owner

@fazzatti fazzatti commented Mar 5, 2026

This pull request introduces minor improvements and bug fixes across multiple core modules, focusing on code consistency, improved type safety, and test accuracy.

Fix

Code Consistency and Type Safety:

  • Improved handling of undefined values by replacing direct checks with the isDefined utility in EventFilter, Transaction, and event parsing logic, leading to safer and more readable code. [1] [2] [3]
  • Added trailing commas to function calls and object literals, and standardized error throwing to include trailing commas for better formatting and maintainability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]
  • Updated type casting in transaction source account parsing to use unknown as xdr.AccountId for improved type safety.

Test Improvements:

  • Corrected the resource fee calculation in the AssembleTransaction unit test to ensure the total transaction fee is accurately computed, reflecting both resource fees from Soroban data and input. [1] [2]

General Maintenance:

  • Updated package version in core/deno.json from 0.16.0 to 0.16.1.
  • Minor documentation and comment cleanups for clarity, including envelope availability notes.

These changes collectively improve code reliability, readability, and test accuracy across the core modules.

…uthEntry functions for SorobanAuthorizationEntry handling
fazzatti and others added 23 commits January 8, 2026 11:50
- Added Transaction class to handle transaction metadata and operations parsing.
- Implemented factory methods for creating Transaction instances from metadata.
- Introduced memoization for performance optimization on frequently accessed properties.
- Added comprehensive unit tests for Transaction class covering various scenarios and envelope types.
- Created types for Ledger, Transaction, and Operation for better type safety and clarity.
- Updated module exports to include new ledger-parser functionalities.
- Implemented LedgerStreamer class to support live and historical ingestion of Stellar ledgers.
- Added methods for starting live, archive, and automatic streaming modes.
- Introduced configuration options for batch size, wait intervals, and error handling.
- Created type definitions for handlers and options related to ledger streaming.
feat: add Event Streamer variant with type definitions

- Introduced `EventStreamerOptions` and `EventStreamerConfig` interfaces for event streaming configuration.
- Created a new file `types.ts` under `rpc-streamer/src/variants/event/`.

feat: implement Ledger Streamer variant with integration and unit tests

- Added `createLedgerStreamer` function to handle live and archive ingestion of ledgers.
- Implemented integration tests for the Ledger Streamer in `index.integration.test.ts`.
- Created unit tests for the Ledger Streamer ingestors in `index.unit.test.ts`.
- Defined `LedgerStreamerOptions` and `LedgerStreamerConfig` interfaces for ledger streaming configuration.
- Added necessary mock helpers and test cases to ensure proper functionality and error handling.
…57)

The Contract constructor creates a fallback RPC server when no `rpc`
is passed, but ignores `networkConfig.allowHttp`. This causes all
HTTP RPC URLs (e.g. local development) to fail with "Cannot connect
to insecure Soroban RPC server".
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.50%. Comparing base (7441242) to head (f0d24e3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
+ Coverage   99.42%   99.50%   +0.08%     
==========================================
  Files         162      174      +12     
  Lines        9350    10580    +1230     
  Branches     1028     1239     +211     
==========================================
+ Hits         9296    10528    +1232     
+ Misses         54       44      -10     
- Partials        0        8       +8     
Flag Coverage Δ
unittests 99.50% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
core/contract/index.ts 97.33% <100.00%> (ø)
core/event/event-filter/index.ts 100.00% <100.00%> (ø)
core/event/parsing/ledger-close-meta.ts 100.00% <100.00%> (ø)
core/ledger-parser/ledger/index.ts 100.00% <100.00%> (ø)
core/ledger-parser/transaction/index.ts 100.00% <100.00%> (ø)
rpc-streamer/src/streamer.ts 100.00% <100.00%> (ø)
sep10/src/client/jwt.ts 100.00% <100.00%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release bump across the workspace packages with small consistency/type-safety refactors (notably adopting isDefined) plus dependency/version updates, and a test adjustment around Soroban resource fees.

Changes:

  • Bump package versions (@colibri/core → 0.16.1 and dependent workspace packages) and update root stellar-sdk version.
  • Replace direct === undefined checks with isDefined in several modules and apply formatting/trailing-comma consistency.
  • Update Contract RPC construction to pass through allowHttp, and adjust an AssembleTransaction fee test expectation.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sep10/src/client/jwt.ts Use isDefined for JWT claim presence checks; minor formatting.
sep10/deno.json Bump package version and @colibri/core dependency.
rpc-streamer/src/streamer.ts Use isDefined for stop-ledger waiting condition.
rpc-streamer/deno.json Bump package version and @colibri/core dependency.
plugins/fee-bump/deno.json Bump package version and core dependency version.
deno.json Update stellar-sdk dependency version.
core/processes/assemble-transaction/index.unit.test.ts Update fee expectation and formatting in tests.
core/ledger-parser/transaction/index.ts Use isDefined, tighten casting, and formatting/doc adjustments.
core/ledger-parser/ledger/index.ts Formatting/doc tweaks and trailing commas.
core/event/parsing/ledger-close-meta.ts Use isDefined in filter checks and formatting.
core/event/event-filter/index.ts Use isDefined to simplify topics serialization.
core/deno.json Bump core package version to 0.16.1.
core/contract/index.ts Pass allowHttp into stellar-sdk/rpc Server construction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 66 to 82
it("executes with resourceFee and add it to the total fee", async () => {
const inclusionFee = "10";
const transaction = createTestTransaction(inclusionFee);
const sorobanData = new SorobanDataBuilder();
sorobanData.setResourceFee(1);
sorobanData.setResourceFee(3);

const input: AssembleTransactionInput = {
transaction,
sorobanData,
authEntries: [],
resourceFee: 5,
};

const result = await P_AssembleTransaction().run(input);
assertInstanceOf(result, Transaction);
assertEquals(result.fee, "15");
assertEquals(result.fee, "18"); // 10 inclusion fee + 3 resource fee from soroban data + 5 resource fee from input
});
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expected fee in this test doesn’t match the current AssembleTransaction implementation. assemble-transaction/index.ts computes updatedFee = parseInt(transaction.fee) + resourceFee and does not add sorobanData’s internal resourceFee, so this assertion will fail when sorobanData.setResourceFee(3) and resourceFee: 5 are provided. Either update the test to expect only inclusionFee + resourceFee (and ideally keep the SorobanDataBuilder’s resourceFee consistent with resourceFee), or update the assemble logic/types so that both the Soroban data resource fee and the explicit resourceFee are intentionally summed.

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this have changed in the way the transaction builder accounts for the sorobanData object in addition to the main fee property

@fazzatti fazzatti merged commit 7f12c23 into main Mar 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants