Skip to content

v2.0.0

Choose a tag to compare

@tonyarnold tonyarnold released this 03 Aug 02:16
· 29 commits to main since this release

Added

  • Constant-Based Dependency Declarations

    • Support for dependency constants like private let TCA = Target.Dependency.product(name: "ComposableArchitecture", package: "swift-composable-architecture")
    • Resolves constant references in dependency arrays (e.g., dependencies: [TCA])
    • Works with all Swift access levels (private, fileprivate, internal, public, open)
    • Maintains full backward compatibility with existing dependency declaration methods
  • New SwiftSyntax-based Parser

    • Added AST-based Package.swift parsing using SwiftSyntax for improved accuracy
    • Configurable parser backend: --parser swiftsyntax|regex|auto (default: auto)
    • Auto mode attempts SwiftSyntax first with regex fallback for compatibility
    • SwiftSyntax parser fixes conditional dependency parsing limitations of regex parser

Fixed

  • Missing Access Modifier Support

    • Added support for open access modifier in dependency constants
    • Fixed parsing of dependency constants without explicit access modifiers (defaults to internal)
  • Conditional Product Dependency Parsing

    • Fixed bug where products declared after conditional dependencies with platform-specific conditions were ignored during parsing
    • Enhanced bracket counting algorithm to properly handle nested brackets within parentheses (e.g., condition: .when(platforms: [.tvOS]))
    • Section extraction now correctly ignores square brackets inside parentheses to prevent premature parsing termination
    • Resolves issue where dependencies like RxSwift were missed when following conditional products like MyModuleTV with platform conditions

Binary Target Usage (Swift Package Manager Plugin)

Add this to your Package.swift for build tool plugin usage:

.binaryTarget(
    name: "SwiftDependencyAuditBinary",
    url: "https://github.com/tonyarnold/swift-dependency-audit/releases/download/v2.0.0/swift-dependency-audit.artifactbundle.zip",
    checksum: "410d3d60f34fae79d0cc6fc62b4c67131e23e5687df67899d13a583378e6bb39"
)

Manual Installation

Download the appropriate binary for your system:

  • Universal macOS (recommended): swift-dependency-audit-v2.0.0-macos-universal.tar.gz
  • Linux x86_64: swift-dependency-audit-v2.0.0-linux-x86_64.tar.gz
  • Linux ARM64: swift-dependency-audit-v2.0.0-linux-aarch64.tar.gz

Quick Install (macOS)

curl -L https://github.com/tonyarnold/swift-dependency-audit/releases/download/v2.0.0/swift-dependency-audit-v2.0.0-macos-universal.tar.gz | tar -xz
sudo mv swift-dependency-audit-v2.0.0-macos-universal/swift-dependency-audit /usr/local/bin/

Quick Install (Linux)

curl -L https://github.com/tonyarnold/swift-dependency-audit/releases/download/v2.0.0/swift-dependency-audit-v2.0.0-linux-x86_64.tar.gz | tar -xz
sudo mv swift-dependency-audit-v2.0.0-linux-x86_64/swift-dependency-audit /usr/local/bin/

Supported Platforms

  • macOS (Universal: ARM64 + x86_64)
  • Linux x86_64 (static binary, no Swift runtime required)
  • Linux ARM64 (static binary, no Swift runtime required)

Plugin Usage

The binary target can be used with the SwiftDependencyAudit build tool plugin for automatic dependency validation during builds.

Checksums

All binaries are signed with SHA256 checksums available in checksums.txt.