Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 24, 2025

This PR contains the following updates:

Package Change Age Confidence
darvaza.org/core v0.16.1 -> v0.18.3 age confidence
darvaza.org/x/web v0.10.1 -> v0.12.1 age confidence

Release Notes

darvaza-proxy/core (darvaza.org/core)

v0.18.3: : Enhanced Panic Testing and Build Improvements

Compare Source

Release v0.18.3

🎯 Highlights

This release enhances the AssertPanic testing utility with intelligent type-aware matching capabilities and includes significant build system improvements for better coverage collection and reporting.

✨ Features

Enhanced Panic Testing
  • Type-aware panic validation: AssertPanic now provides different matching strategies based on the expected type.
    • nil: Accepts any panic (most common use case).
    • error: Uses errors.Is for error chain matching.
    • string: Performs substring matching for more resilient tests.
    • Recovered: Direct comparison without unwrapping.
    • Other types: Exact equality check with automatic Recovered unwrapping.
  • Improved logging: Panic assertions now include clear context in their log messages.
  • 100% test coverage: The entire testing.go file now has complete test coverage.
Build System Enhancements
  • Enhanced coverage collection: New HTML and text report generation with .tmp/coverage/ directory structure.
  • Improved Codecov integration: Better monorepo support with module-specific coverage targets.
  • Go 1.25 support: Added as the default version in CI/CD pipelines.

🔧 Improvements

Development Experience
  • Enhanced .editorconfig with comprehensive file type support.
  • Improved .gitignore with additional patterns for better repository hygiene.
  • Reorganised Makefile variable definitions for better maintainability.
  • Updated GitHub Actions to latest versions (setup-go v6, setup-node v5).
Code Quality
  • Refactored doAssertPanic helpers for cleaner implementation.
  • Simplified panic validation logic by removing the report flag.
  • Consistent use of the ok := test() pattern throughout.
  • Field-aligned test structures for memory efficiency.

⚠️ Breaking Changes

  • AssertPanic string matching: String expectations now use substring matching instead of exact equality.

    // Previously would fail, now passes:
    AssertPanic(t, func() { panic("unexpected error occurred") }, "error", "test")
  • AssertPanic error matching: Error expectations now use errors.Is semantics for chain matching.

    // Now matches wrapped errors:
    AssertPanic(t, func() { panic(fmt.Errorf("wrapped: %w", io.EOF)) }, io.EOF, "test")

📊 Statistics

  • Files changed: 16
  • Insertions: 339 lines
  • Deletions: 139 lines
  • Test coverage: 97.3% overall, 100% for testing.go

🤝 Contributors

📦 Dependencies

  • Updated actions/setup-go to v6.
  • Updated actions/setup-node to v5.

🔗 Links


This release focuses on making panic testing more intuitive and resilient whilst maintaining backward compatibility for most use cases. The enhanced type-aware matching aligns with developer expectations and reduces test brittleness.

v0.18.2

Compare Source

Release v0.18.2

This release introduces comprehensive same-ness testing utilities and significantly improves documentation patterns for the testing framework. The release focuses on enhancing the developer experience with better testing tools and clearer guidance on testing patterns.

🚀 New Features

Same-ness Testing Functions
  • IsSame() - Base function for determining same-ness with comprehensive type handling
  • AssertSame() / AssertNotSame() - Non-fatal assertion functions for same-ness testing
  • AssertMustSame() / AssertMustNotSame() - Fatal assertion functions that terminate test execution on failure

Key Capabilities:

  • Value types (numbers, strings, booleans): Same-ness means equal values.
  • Reference types (slices, maps, pointers, channels, functions): Same-ness means pointer equality to the same underlying data structure.
  • Proper nil handling: Typed nils of same type are considered same.
  • Interface support: Recursive comparison of contained values.
  • Special case handling: Zero-capacity slice optimisations, invalid reflect.Value protection.
Cross-Compatible Test Functions
  • Enhanced MockT.Run documentation with interface compatibility patterns.
  • doRun helper pattern for test functions that work with both *testing.T and MockT interfaces.
  • Type assertion fallback mechanism for graceful degradation across different testing interfaces.

📚 Documentation Improvements

TESTING.md Enhancements
  • Testing Patterns Overview clearly distinguishing TestCase interface vs t.Run() usage.
  • "When to Use TestCase Interface" with specific criteria for table-driven tests.
  • "When to Use t.Run() with Named Functions" for different test scenarios.
  • Updated terminology consistency throughout documentation.
  • British English corrections and improved formatting.
README.md Updates
  • Same-ness testing functions documentation in the Testing Utilities section.
  • Cross-Compatible Test Functions section with complete implementation examples.
  • Fatal Assertion Functions section updated with new AssertMust variants.

🔧 Code Quality Improvements

Test Suite Modernization
  • Refactored existing tests to use modern assertion patterns:
    • as_test.go: Updated to use AssertEqual for length checks
    • compounderror_test.go: Modernized with AssertSame, AssertEqual, AssertNotNil
    • errgroup_test.go: Improved with AssertSame for error instance checks
    • lists_test.go: Enhanced with AssertNotSame for independence verification
  • Consistent test case patterns applied across zero_test.go functions.
  • Fatal assertion pattern applied consistently for critical preconditions.
Enhanced Test Coverage
  • Comprehensive test suite for same-ness functions covering all scenarios.
  • MockT.Run() testing for both success and failure scenarios.
  • Coverage maintained at 97.3% with all tests passing.

🛠️ Dependencies & Infrastructure

Dependency Updates
  • golang.org/x/net updated to v0.43.0.
  • actions/checkout updated to v5 across all GitHub workflows.
Build System
  • Updated CSpell dictionary with new technical terms.
  • Enhanced GitHub Actions workflows with latest action versions.

🔍 Technical Details

Implementation Highlights
  • asReflectValue() helper to avoid duplicate reflect.ValueOf() calls.
  • isReflectValueSame() helper following established naming patterns.
  • Special handling for empty slices due to Go runtime memory optimisation.
  • Stack overflow protection in recursive interface comparisons.
  • Unsafe pointer and complex number support with comprehensive tests.
Breaking Changes

None - This is a purely additive release that maintains full backward compatibility.

📊 Statistics

  • 18 files changed: 1,323 insertions, 257 deletions.
  • 4 major features added to the testing utilities.
  • 5 GitHub workflow files updated with latest dependencies.
  • 2 comprehensive documentation overhauls (TESTING.md, README.md).
  • 150+ new test cases added for comprehensive coverage.

🎯 Impact

This release significantly enhances the testing experience for both internal development and external library users by:

  1. Providing powerful same-ness testing utilities that properly distinguish between value and reference equality.
  2. Clarifying testing patterns to help developers choose appropriate testing approaches.
  3. Modernising the existing test suite with consistent patterns and better assertions.
  4. Maintaining excellent documentation with clear examples and usage guidance.

The release maintains the library's core principles of zero external dependencies while substantially improving the developer experience for testing Go applications.

Full Changelog

Changes since v0.18.1:

  • feat(testing): add AssertMustSame/AssertMustNotSame functions (#​135)
  • feat(core): add same-ness testing functions and modernise test patterns (#​135)
  • docs(testing): clarify TestCase interface is only for table-driven tests (#​139)
  • docs(testing): document cross-compatible test function pattern (#​135)
  • test(core): refactor tests to use consistent test case pattern (#​135)
  • chore(deps): update actions/checkout action to v5 (#​137)
  • fix(deps): update module golang.org/x/net to v0.43.0 (#​136)

v0.18.1

Compare Source

Testing Utilities and Build System Improvements

New Testing Features

AssertMustFoo() Functions

Add 14 new assertion functions that automatically call t.FailNow() on
failure, eliminating the need for manual if !Assert() { t.FailNow() }
patterns:

  • AssertMustEqual[T], AssertMustNotEqual[T], AssertMustSliceEqual[T]
  • AssertMustTrue, AssertMustFalse, AssertMustNil, AssertMustNotNil
  • AssertMustContains, AssertMustError, AssertMustNoError
  • AssertMustErrorIs, AssertMustPanic, AssertMustNoPanic
  • AssertMustTypeIs[T]
Generic Type Conversion Utilities
  • MustT[T](value any) T: Convert any value to type T, panic on failure.
  • MaybeT[T](value any) T: Convert any value to type T, return zero on
    failure.

Both functions build on the existing As[any, T] foundation.

Enhanced MockT Interface

Complete testing.T compatibility with Fatal, Fatalf, FailNow, and
Run() methods. Thread-safe implementation with proper panic recovery for
testing assertion functions.

Build System Enhancements

Race Detection Support
  • Dedicated race detection workflow with per-module targets.
  • Proper CGO configuration for race detector.
  • Separate from main test workflows for better CI efficiency.
Improved Coverage System
  • Atomic coverage mode with better error reporting.
  • Simplified Codecov integration with per-module uploads.
  • Enhanced coverage profile merging and multiple output formats.
GitHub Actions Optimisation
  • Dependency-based caching for improved build performance.
  • Workflow separation strategy for better resource utilisation.
  • Optimised action configurations across all workflows.

Documentation

  • Updated README.md with new testing utilities and examples.
  • Enhanced TESTING.md with Fatal/FailNow patterns.
  • New comprehensive BUILDING.md covering build system architecture.

Technical Details

  • Maintains 97.1% test coverage.
  • Zero external dependencies preserved.
  • Thread-safe implementations with optimised performance.
  • Follows Go testing conventions for Error vs Fatal patterns.

This release establishes the foundation for expanded assertion functionality
whilst significantly improving the build and testing infrastructure.

v0.18.0

Compare Source

v0.18.0 Release Notes

New Features

Feature Description
Must(T, error) T New generic utility for error handling that panics on error, simplifying error propagation in initialization code.
Maybe(T, error) (T, bool) New generic utility that converts error-returning functions to optional-style returns with boolean success indicator.
MustOK(T, bool) T New generic utility for bool-based operations that panics when the boolean is false, useful for assertion-style code.
MaybeOK(T, bool) (T, bool) New generic utility that handles bool-based operations by returning the value and success status.
Enhanced testing infrastructure Comprehensive transformation of testing utilities to public API with TestCase interface, AssertNotEqual function, and extensive documentation.

Improvements

Feature Description
CompoundError.OK() Standardised method name from Ok() to OK() with backward compatibility maintained through type alias.
golangci-lint v2.3.0 Updated to latest version with improved Go 1.23 support and standardised API naming conventions.
Testing patterns Implemented consistent TestCase interface across all test files for better test organisation and maintainability.

Key Benefits

  • Enhanced error handling with generic utilities for common patterns.
  • Improved testing infrastructure with comprehensive public API.
  • Better backward compatibility handling for API changes.
  • Standardised naming conventions across the codebase.

Quality and Documentation

  • Enhanced test coverage and documentation consistency across all modules.
  • Improved error handling patterns with new generic utilities.
  • Better alignment of code documentation with project standards.
  • Consistent use of project testing patterns and helpers.
  • Updated build tools to latest versions with improved linting support.

Files Changed

File Changes
generics.go, generics_test.go New generic error handling utilities.
testing.go, testing_test.go Enhanced testing infrastructure with public API.
compounderror.go, compounderror_test.go API standardisation with backward compatibility.
Various test files Consistent TestCase interface implementation.
README.md Documentation improvements with proper punctuation.
Build configuration Updated golangci-lint and standardised naming.

Breaking Changes

No Breaking Changes - All changes are backwards compatible additions and
improvements. The CompoundError.Ok() method remains available as an alias.
Existing code will continue to work without modification.

Installation

go get darvaza.org/[email protected]

Commit History

Commit Description
6d20ae1 feat: add MustOK/MaybeOK generic utilities for bool-based operations
08e9fe2 feat: add Must/Maybe generic utilities for error handling
ecffb4b refactor(tests): implement TestCase interface across all test files
85b44e7 feat(testing): add AssertNotEqual function for inequality assertions.
ce96839 feat(testing): transform testing infrastructure to public API with comprehensive utilities
2885be0 feat: standardise CompoundError.Ok() to OK() with backward compatibility
81b83ec build: update golangci-lint to v2.3.0 and standardise API naming
af0433f docs(testing): add comprehensive testing guidelines and patterns
3ce4976 refactor: clean up spelling dictionary and standardise camelCase naming
3321cd2 docs: add periods to end of sentences in README.md

v0.17.5

Compare Source

Release v0.17.5

✨ New Features

Zero Value Utilities
Feature Description
IsNil(vi any) bool New function for typed nil detection, addressing cases where == nil comparisons fail with typed nil interfaces.
Enhanced utilities Comprehensive enhancement of zero value utilities with improved documentation and examples.
Stack Tracing Enhancements
Feature Description
Frame.PkgFile() string New method returning package-relative file paths for cleaner stack traces.
Frame.String() and Stack.String() New string methods providing human-readable representations.
Format flag support Added '#' flag to Frame.Format() for PkgFile display mode.

🐛 Bug Fixes

Context Utilities
  • Improved nil handling and edge cases in context operations.
  • Better error handling for edge cases in context timeout operations.
Stack Tracing
  • Fixed empty file string handling in formatFile function for more robust
    stack trace formatting.

📚 Documentation

Enhanced Documentation Across Modules
  • Improved SplitName documentation with better clarity and formatting.
  • Converted Format() doc comments to line style for improved go doc
    display.
  • Enhanced Go documentation for error checking functions with clearer
    examples.
  • Updated stack tracing documentation to match project documentation
    standards.
  • Improved context utilities documentation with better usage examples.

🧪 Testing

Comprehensive Test Coverage
Component Description
Stack tracing Added comprehensive test coverage for all stack tracing functionality.
Error handling Added extensive tests for error checking and handling functions.
Network utilities Enhanced test coverage for splithostport module.
Collections Improved test coverage for slices and lists modules.
Context utilities Refactored tests using established project patterns.
Test Infrastructure
  • Better test organization using established helper patterns.
  • Improved error case coverage across all modules.
  • Enhanced benchmark coverage for performance-critical functions.

🔧 Internal Improvements

  • Enhanced test coverage and documentation consistency across all modules.
  • Improved error handling patterns and edge case coverage.
  • Better alignment of code documentation with project standards.
  • Consistent use of project testing patterns and helpers.

Files Changed

File Changes
context.go, context_test.go Context utilities improvements.
errors.go, errors_test.go Error handling enhancements.
lists_test.go Enhanced list utilities testing.
slices_test.go Improved slice utilities testing.
splithostport.go, splithostport_test.go Network utilities improvements.
stack.go, stack_test.go Stack tracing feature additions.
zero.go, zero_test.go Zero value utilities expansion.
README.md Documentation updates.

Compatibility

No Breaking Changes - All changes are backwards compatible additions and
improvements. Existing code will continue to work without modification.

Installation

go get darvaza.org/[email protected]

Notable Commits

Commit Description
b176491 feat(zero): add IsNil function for typed nil detection.
53a8a6d feat(stack): add PkgFile() method to Frame with comprehensive tests.
41060b8 feat(stack): add String methods to Frame and Stack.
68ff5bd feat(stack): add '#' flag support to Frame.Format() for PkgFile display.
9148230 fix(context): improve nil handling and edge cases.
8fc827d fix(stack): improve empty file string handling in formatFile.

v0.17.4

Compare Source

Bug Fixes

  • fix(maps): correct MapListContainsFn nil check condition

Test Infrastructure

  • feat(tests): add comprehensive test helper functions (AssertEqual, AssertSliceEqual, etc.)
  • feat(tests): add ST helper for concise slice creation
  • refactor(tests): convert all test slice literals to use ST helper
  • refactor(tests): convert TestSliceReverse to structured test cases

Performance

  • Enable field alignment optimization across all structs
  • Fix struct memory layout for better efficiency

Build System

  • Pin golangci-lint to v1.64.8 with schema validation docs
  • Enhanced cspell dictionary and documentation

Statistics

23 files changed, +1920/-357 lines

All tests pass, backward compatible, no breaking changes.

v0.17.3: - Network utilities bug fixes and enhanced test coverage

Compare Source

Bug Fixes

  • fix(addrs): properly handle IPv4 unmapping in network utilities
    • IPv4 addresses now return as clean IPv4 (192.168.1.1) instead of IPv4-mapped IPv6 (::ffff:192.168.1.1)
    • AddrPort() interface method now validates returned values
    • AddrFromNetIP consistently returns unmapped IPv4 addresses

Test Coverage

  • test(addrport): add comprehensive tests for AddrPort extraction (374 new lines)
  • test(addrs): add comprehensive tests for network address utilities (621 new lines)
  • test(as): add comprehensive tests for type conversion utilities (556 new lines)
  • Overall test coverage improved to 63.9%

Documentation

  • Enhanced function documentation with detailed type support lists
  • Added comprehensive edge case coverage in tests

Full Changelog

Full Changelog: darvaza-proxy/core@v0.17.2...v0.17.3

v0.17.2

Compare Source

v0.17.1

Compare Source

v0.17.0

Compare Source

v0.16.3

Compare Source

v0.16.2

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

socket-security bot commented Mar 24, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updateddarvaza.org/​x/​web@​v0.10.1 ⏵ v0.12.175 -4100100100100
Updateddarvaza.org/​core@​v0.16.1 ⏵ v0.18.399100100100100

View full report

@renovate renovate bot changed the title fix(deps): update module darvaza.org/core to v0.16.2 fix(deps): update module darvaza.org/core to v0.16.3 Apr 5, 2025
@renovate renovate bot force-pushed the renovate/darvaza branch 2 times, most recently from fafcf3d to 976b19c Compare April 7, 2025 19:26
@renovate renovate bot changed the title fix(deps): update module darvaza.org/core to v0.16.3 fix(deps): update darvaza projects Apr 7, 2025
@renovate
Copy link
Contributor Author

renovate bot commented Apr 7, 2025

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 3 additional dependencies were updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.22 -> 1.23.0
darvaza.org/x/fs v0.4.1 -> v0.5.2
golang.org/x/net v0.35.0 -> v0.43.0
golang.org/x/text v0.22.0 -> v0.28.0

@renovate renovate bot force-pushed the renovate/darvaza branch from 976b19c to a1293c6 Compare June 3, 2025 16:39
@renovate renovate bot force-pushed the renovate/darvaza branch 2 times, most recently from 29d2c80 to 38aff14 Compare July 5, 2025 17:56
@renovate renovate bot force-pushed the renovate/darvaza branch 3 times, most recently from 412227c to ebc0461 Compare July 18, 2025 20:06
@renovate renovate bot force-pushed the renovate/darvaza branch 2 times, most recently from b5b0c0a to 75f9a94 Compare August 5, 2025 02:58
@renovate renovate bot force-pushed the renovate/darvaza branch from 75f9a94 to 3386030 Compare August 8, 2025 20:34
@renovate renovate bot force-pushed the renovate/darvaza branch 2 times, most recently from 38ffa66 to 3cf4b24 Compare August 21, 2025 03:13
@renovate renovate bot force-pushed the renovate/darvaza branch from 3cf4b24 to 72cd271 Compare September 7, 2025 21:55
@renovate renovate bot force-pushed the renovate/darvaza branch from 72cd271 to 8b3af5f Compare October 21, 2025 17:55
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.

0 participants