From 2aa6bf54ebcd815253595fae80f6e249c0eac825 Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 7 Mar 2024 17:53:48 -0700 Subject: [PATCH 01/16] Improve preview API --- .../Application/Application+public.swift | 27 +++++++++++++++++++ .../Application+ApplicationPreview.swift | 22 +++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Sources/AppDependency/Application/Types/Helper/Application+ApplicationPreview.swift diff --git a/Sources/AppDependency/Application/Application+public.swift b/Sources/AppDependency/Application/Application+public.swift index 807bcb4..cfe7d83 100644 --- a/Sources/AppDependency/Application/Application+public.swift +++ b/Sources/AppDependency/Application/Application+public.swift @@ -1,4 +1,7 @@ import Foundation +#if !os(Linux) && !os(Windows) +import SwiftUI +#endif // MARK: Application Functions @@ -259,6 +262,30 @@ public extension Application { } } +#if !os(Linux) && !os(Windows) +// MARK: - SwiftUI Preview Dependency Functions + +public extension Application { + /** + Use in SwiftUI previews to inject mock dependencies into the content view. + - Parameters: + - dependencyOverrides: An array of `Application.override(_, with:)` outputs that you want to use for the preview. + - content: A closure that returns the View you want to preview. + - Returns: A View with the overridden dependencies applied. + */ + @ViewBuilder + static func preview( + _ dependencyOverrides: DependencyOverride..., + content: @escaping () -> Content + ) -> some View { + ApplicationPreview( + dependencyOverrides: dependencyOverrides, + content: content + ) + } +} +#endif + // MARK: - DependencySlice Functions extension Application { diff --git a/Sources/AppDependency/Application/Types/Helper/Application+ApplicationPreview.swift b/Sources/AppDependency/Application/Types/Helper/Application+ApplicationPreview.swift new file mode 100644 index 0000000..35d6cf9 --- /dev/null +++ b/Sources/AppDependency/Application/Types/Helper/Application+ApplicationPreview.swift @@ -0,0 +1,22 @@ +#if !os(Linux) && !os(Windows) +import SwiftUI + +extension Application { + struct ApplicationPreview: View { + let dependencyOverrides: [DependencyOverride] + let content: () -> Content + + init( + dependencyOverrides: [DependencyOverride], + content: @escaping () -> Content + ) { + self.dependencyOverrides = dependencyOverrides + self.content = content + } + + var body: some View { + content() + } + } +} +#endif From d50ef7025c5447786c9c143e74868e4e01ec582a Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 7 Mar 2024 18:17:44 -0700 Subject: [PATCH 02/16] Add workflow folder --- .github/workflows/docc.yml | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 8 -------- 2 files changed, 8 deletions(-) create mode 100644 .github/workflows/docc.yml delete mode 100644 .swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.github/workflows/docc.yml b/.github/workflows/docc.yml new file mode 100644 index 0000000..e69de29 diff --git a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - From f928e1a9f7b81f978b79321e0be0f52ad93d922e Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:18:30 -0700 Subject: [PATCH 03/16] Update docc.yml --- .github/workflows/docc.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/docc.yml b/.github/workflows/docc.yml index e69de29..9dc24bb 100644 --- a/.github/workflows/docc.yml +++ b/.github/workflows/docc.yml @@ -0,0 +1,40 @@ +name: docc +on: + release: + types: [released] +permissions: + contents: read + pages: write + id-token: write +concurrency: + group: pages + cancel-in-progress: true +jobs: + pages: + environment: + name: github-pages + url: '${{ steps.deployment.outputs.page_url }}' + runs-on: macos-13 + steps: + - uses: swift-actions/setup-swift@v1 + - name: git checkout + uses: actions/checkout@v3 + - name: docbuild + run: > + sudo xcode-select -s /Applications/Xcode_15.0.app; + xcodebuild docbuild -scheme AppDependency \ + -derivedDataPath /tmp/docbuild \ + -destination 'generic/platform=iOS'; + $(xcrun --find docc) process-archive \ + transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/AppDependency.doccarchive \ + --output-path docs \ + --hosting-base-path 'AppDependency'; + echo "" > docs/index.html; + - name: artifacts + uses: actions/upload-pages-artifact@v1 + with: + path: docs + - name: deploy + id: deployment + uses: actions/deploy-pages@v1 From 57988ac7888f80fb94b6751b371f0b276a3fce7d Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:19:23 -0700 Subject: [PATCH 04/16] Create ubuntu.yml --- .../workflows/.github/workflows/ubuntu.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/.github/workflows/ubuntu.yml diff --git a/.github/workflows/.github/workflows/ubuntu.yml b/.github/workflows/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..57245ed --- /dev/null +++ b/.github/workflows/.github/workflows/ubuntu.yml @@ -0,0 +1,20 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: Ubuntu + +on: + push: + branches: ["**"] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: swift-actions/setup-swift@v1 + - uses: actions/checkout@v3 + - name: Build for release + run: swift build -v -c release + - name: Test + run: swift test -v From 3502d5a01443035bba8502407e9043dc9dcf6a1d Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:20:01 -0700 Subject: [PATCH 05/16] Delete .github/workflows/.github/workflows directory --- .../workflows/.github/workflows/ubuntu.yml | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/.github/workflows/ubuntu.yml diff --git a/.github/workflows/.github/workflows/ubuntu.yml b/.github/workflows/.github/workflows/ubuntu.yml deleted file mode 100644 index 57245ed..0000000 --- a/.github/workflows/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,20 +0,0 @@ -# This workflow will build a Swift project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift - -name: Ubuntu - -on: - push: - branches: ["**"] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: swift-actions/setup-swift@v1 - - uses: actions/checkout@v3 - - name: Build for release - run: swift build -v -c release - - name: Test - run: swift test -v From ec31af96c5ab5c9fe8ab36ad92968dfe503af89e Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:20:14 -0700 Subject: [PATCH 06/16] Create ubunutu.yml --- .github/workflows/ubunutu.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/ubunutu.yml diff --git a/.github/workflows/ubunutu.yml b/.github/workflows/ubunutu.yml new file mode 100644 index 0000000..57245ed --- /dev/null +++ b/.github/workflows/ubunutu.yml @@ -0,0 +1,20 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: Ubuntu + +on: + push: + branches: ["**"] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: swift-actions/setup-swift@v1 + - uses: actions/checkout@v3 + - name: Build for release + run: swift build -v -c release + - name: Test + run: swift test -v From 3617e9ed8b89d157821b1155607da38f0e9d509e Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:20:37 -0700 Subject: [PATCH 07/16] Create windows.yml --- .github/workflows/windows.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..84e488a --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,18 @@ +name: Windows + +on: + push: + branches: ["**"] + +jobs: + build: + runs-on: windows-latest + steps: + - uses: compnerd/gha-setup-swift@main + with: + branch: swift-5.9.2-release + tag: 5.9.2-RELEASE + + - uses: actions/checkout@v2 + - run: swift build + - run: swift test From dcba2ed1705697e8420dc5023439e01eee8c1046 Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:20:47 -0700 Subject: [PATCH 08/16] Rename ubunutu.yml to ubuntu.yml --- .github/workflows/{ubunutu.yml => ubuntu.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ubunutu.yml => ubuntu.yml} (100%) diff --git a/.github/workflows/ubunutu.yml b/.github/workflows/ubuntu.yml similarity index 100% rename from .github/workflows/ubunutu.yml rename to .github/workflows/ubuntu.yml From 93f581310369f156498d04029be877efa3e1aeae Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:21:06 -0700 Subject: [PATCH 09/16] Create macOS.yml --- .github/workflows/macOS.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/macOS.yml diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml new file mode 100644 index 0000000..1fc0047 --- /dev/null +++ b/.github/workflows/macOS.yml @@ -0,0 +1,23 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: macOS + +on: + push: + branches: ["**"] + +jobs: + build: + runs-on: macos-13 + + steps: + - uses: swift-actions/setup-swift@v1 + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + - uses: actions/checkout@v3 + - name: Build for release + run: swift build -v -c release + - name: Test + run: swift test -v From fc234f062d8781952a518ed4389d35a1b6014c66 Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:21:39 -0700 Subject: [PATCH 10/16] Create FUNDING.yml --- .github/FUNDING.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..0c02a71 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: [0xLeif] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 6142ee607bfa9a5de0699492ca27f4746b4e64cd Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:21:53 -0700 Subject: [PATCH 11/16] Delete Package.resolved --- Package.resolved | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 Package.resolved diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index b5c0757..0000000 --- a/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "cache", - "kind" : "remoteSourceControl", - "location" : "https://github.com/0xLeif/Cache", - "state" : { - "revision" : "a535c68aab7bf0b42bda7a5de66b04f86e48c6e6", - "version" : "2.1.0" - } - } - ], - "version" : 2 -} From 620825e5b4e185f0e3ef19ecae2ab62567b34fba Mon Sep 17 00:00:00 2001 From: Zach Date: Thu, 7 Mar 2024 18:23:49 -0700 Subject: [PATCH 12/16] Create ApplicationLogger.swift --- .../Helper/ApplicationLogger.swift | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Sources/AppDependency/Application/Helper/ApplicationLogger.swift diff --git a/Sources/AppDependency/Application/Helper/ApplicationLogger.swift b/Sources/AppDependency/Application/Helper/ApplicationLogger.swift new file mode 100644 index 0000000..b6b0c12 --- /dev/null +++ b/Sources/AppDependency/Application/Helper/ApplicationLogger.swift @@ -0,0 +1,34 @@ +#if os(Linux) || os(Windows) +/// `ApplicationLogger` is a class that provides logging functionalities for Linux and Windows operating systems. +open class ApplicationLogger { + /// Prints a debug message. + /// - Parameter message: The message to be logged. + open func debug(_ message: String) { + debug { message } + } + + /// Prints a debug message. + /// - Parameter message: A closure that returns the message to be logged. + open func debug(_ message: () -> String) { + print(message()) + } + + /// Logs an error message. + /// - Parameters: + /// - error: The error that occurred. + /// - message: An optional custom message to accompany the error. + open func error(_ error: Error, message: String? = nil) { + guard let message else { + return print("Error: \(error.localizedDescription)") + } + + print("\(message) (Error: \(error.localizedDescription))") + } + + /// Logs an error message. + /// - Parameter message: The error message to be logged. + open func error(_ message: String) { + print("Error: \(message)") + } +} +#endif From c404e326202665565c609561a82a2a720da85c33 Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 7 Mar 2024 18:35:30 -0700 Subject: [PATCH 13/16] Add tests --- .../AppDependencyTests.swift | 80 +++++++++++++++++-- .../DependencySliceTests.swift | 78 ++++++++++++++++++ .../ObservedDependencyTests.swift | 54 +++++++++++++ 3 files changed, 207 insertions(+), 5 deletions(-) create mode 100644 Tests/AppDependencyTests/DependencySliceTests.swift create mode 100644 Tests/AppDependencyTests/ObservedDependencyTests.swift diff --git a/Tests/AppDependencyTests/AppDependencyTests.swift b/Tests/AppDependencyTests/AppDependencyTests.swift index 698a6db..dc49efd 100644 --- a/Tests/AppDependencyTests/AppDependencyTests.swift +++ b/Tests/AppDependencyTests/AppDependencyTests.swift @@ -1,12 +1,82 @@ +/// Mirror of [AppState.AppDependencyTests](https://github.com/0xLeif/AppState/blob/main/Tests/AppStateTests/AppDependencyTests.swift) import XCTest @testable import AppDependency +fileprivate protocol Networking { + func fetch() +} + +fileprivate class NetworkService: Networking { + func fetch() { + fatalError() + } +} + +fileprivate class MockNetworking: Networking { + func fetch() { /* no-op */ } +} + +fileprivate class ComposableService { + let networking: Networking + + init(networking: Networking) { + self.networking = networking + } +} + +fileprivate extension Application { + var networking: Dependency { + dependency(NetworkService()) + } + + var composableService: Dependency { + dependency(ComposableService(networking: Application.dependency(\.networking))) + } +} + +fileprivate struct ExampleDependencyWrapper { + @AppDependency(\.networking) private var networking + + func fetch() { + networking.fetch() + } +} + final class AppDependencyTests: XCTestCase { - func testExample() throws { - // XCTest Documentation - // https://developer.apple.com/documentation/xctest + override class func setUp() { + Application.logging(isEnabled: true) + } + + override class func tearDown() { + Application.logger.debug("AppDependencyTests \(Application.description)") + } + + func testComposableDependencies() { + let dependencyOverride = Application.override(\.networking, with: MockNetworking()) + + let composableService = Application.dependency(\.composableService) + composableService.networking.fetch() + + dependencyOverride.cancel() + } + + func testDependency() async throws { + let networkingOverride = Application.override(\.networking, with: MockNetworking()) + + let mockNetworking = Application.dependency(\.networking) + + XCTAssertNotNil(mockNetworking as? MockNetworking) + + mockNetworking.fetch() + + let example = ExampleDependencyWrapper() + + example.fetch() + + networkingOverride.cancel() + + let networkingService = Application.dependency(\.networking) - // Defining Test Cases and Test Methods - // https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods + XCTAssertNotNil(networkingService as? NetworkService) } } diff --git a/Tests/AppDependencyTests/DependencySliceTests.swift b/Tests/AppDependencyTests/DependencySliceTests.swift new file mode 100644 index 0000000..7d75e10 --- /dev/null +++ b/Tests/AppDependencyTests/DependencySliceTests.swift @@ -0,0 +1,78 @@ +/// Mirror of [AppState.DependencySliceTests](https://github.com/0xLeif/AppState/blob/main/Tests/AppStateTests/DependencySliceTests.swift) +import Foundation +#if !os(Linux) && !os(Windows) +import SwiftUI +#endif +import XCTest +@testable import AppDependency + +fileprivate class ExampleViewModel { + var username: String? = nil + var isLoading: Bool = false + let value: String = "Hello, World!" + var mutableValue: String = "..." +} + +#if !os(Linux) && !os(Windows) +extension ExampleViewModel: ObservableObject { } +#endif + +fileprivate extension Application { + var exampleViewModel: Dependency { + dependency(ExampleViewModel()) + } +} + +fileprivate struct ExampleView { + @DependencySlice(\.exampleViewModel, \.username) var username + @DependencySlice(\.exampleViewModel, \.isLoading) var isLoading + @DependencyConstant(\.exampleViewModel, \.value) var constantValue + @DependencyConstant(\.exampleViewModel, \.mutableValue) var constantMutableValue + + func testPropertyWrappers() { + username = "Hello, ExampleView" + #if !os(Linux) && !os(Windows) + _ = Toggle(isOn: $isLoading) { + Text(constantMutableValue) + } + #endif + } +} + +final class DependencySliceTests: XCTestCase { + override class func setUp() { + Application.logging(isEnabled: true) + } + + override class func tearDown() { + Application.logger.debug("DependencySliceTests \(Application.description)") + } + + func testApplicationSliceFunction() { + var exampleSlice = Application.dependencySlice(\.exampleViewModel, \.username) + + exampleSlice.value = "New Value!" + + XCTAssertEqual(exampleSlice.value, "New Value!") + XCTAssertEqual(Application.dependencySlice(\.exampleViewModel, \.username).value, "New Value!") + XCTAssertEqual(Application.dependency(\.exampleViewModel).username, "New Value!") + + exampleSlice.value = "Leif" + + XCTAssertEqual(exampleSlice.value, "Leif") + XCTAssertEqual(Application.dependencySlice(\.exampleViewModel, \.username).value, "Leif") + XCTAssertEqual(Application.dependency(\.exampleViewModel).username, "Leif") + } + + func testPropertyWrappers() { + let exampleView = ExampleView() + + XCTAssertEqual(exampleView.username, "Leif") + + exampleView.testPropertyWrappers() + + XCTAssertEqual(exampleView.username, "Hello, ExampleView") + XCTAssertEqual(exampleView.constantValue, "Hello, World!") + XCTAssertEqual(exampleView.constantMutableValue, "...") + } +} diff --git a/Tests/AppDependencyTests/ObservedDependencyTests.swift b/Tests/AppDependencyTests/ObservedDependencyTests.swift new file mode 100644 index 0000000..9fa02dd --- /dev/null +++ b/Tests/AppDependencyTests/ObservedDependencyTests.swift @@ -0,0 +1,54 @@ +/// Mirror of [AppState.ObservedDependencyTests](https://github.com/0xLeif/AppState/blob/main/Tests/AppStateTests/ObservedDependencyTests.swift) +#if !os(Linux) && !os(Windows) +import SwiftUI +import XCTest +@testable import AppDependency + +fileprivate class ObservableService: ObservableObject { + @Published var count: Int + + init() { + count = 0 + } +} + +fileprivate extension Application { + var test: Dependency { + dependency("!!!") + } + + var observableService: Dependency { + dependency(ObservableService()) + } +} + +fileprivate struct ExampleDependencyWrapper { + @ObservedDependency(\.observableService) var service + + func test() { + service.count += 1 + + _ = Picker("", selection: $service.count, content: EmptyView.init) + } +} + +final class ObservedDependencyTests: XCTestCase { + override class func setUp() { + Application.logging(isEnabled: true) + } + + override class func tearDown() { + Application.logger.debug("ObservedDependencyTests \(Application.description)") + } + + func testDependency() { + let example = ExampleDependencyWrapper() + + XCTAssertEqual(example.service.count, 0) + + example.test() + + XCTAssertEqual(example.service.count, 1) + } +} +#endif From e7e5940753a5e24da824064b7cf9aab55fb021f0 Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 7 Mar 2024 18:39:08 -0700 Subject: [PATCH 14/16] Remove mirror comments --- Tests/AppDependencyTests/AppDependencyTests.swift | 1 - Tests/AppDependencyTests/DependencySliceTests.swift | 1 - Tests/AppDependencyTests/ObservedDependencyTests.swift | 1 - 3 files changed, 3 deletions(-) diff --git a/Tests/AppDependencyTests/AppDependencyTests.swift b/Tests/AppDependencyTests/AppDependencyTests.swift index dc49efd..3cfeed3 100644 --- a/Tests/AppDependencyTests/AppDependencyTests.swift +++ b/Tests/AppDependencyTests/AppDependencyTests.swift @@ -1,4 +1,3 @@ -/// Mirror of [AppState.AppDependencyTests](https://github.com/0xLeif/AppState/blob/main/Tests/AppStateTests/AppDependencyTests.swift) import XCTest @testable import AppDependency diff --git a/Tests/AppDependencyTests/DependencySliceTests.swift b/Tests/AppDependencyTests/DependencySliceTests.swift index 7d75e10..6304ac0 100644 --- a/Tests/AppDependencyTests/DependencySliceTests.swift +++ b/Tests/AppDependencyTests/DependencySliceTests.swift @@ -1,4 +1,3 @@ -/// Mirror of [AppState.DependencySliceTests](https://github.com/0xLeif/AppState/blob/main/Tests/AppStateTests/DependencySliceTests.swift) import Foundation #if !os(Linux) && !os(Windows) import SwiftUI diff --git a/Tests/AppDependencyTests/ObservedDependencyTests.swift b/Tests/AppDependencyTests/ObservedDependencyTests.swift index 9fa02dd..6643aae 100644 --- a/Tests/AppDependencyTests/ObservedDependencyTests.swift +++ b/Tests/AppDependencyTests/ObservedDependencyTests.swift @@ -1,4 +1,3 @@ -/// Mirror of [AppState.ObservedDependencyTests](https://github.com/0xLeif/AppState/blob/main/Tests/AppStateTests/ObservedDependencyTests.swift) #if !os(Linux) && !os(Windows) import SwiftUI import XCTest From a7a5f06faab494eb6d281caba85262cb3e638e52 Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 7 Mar 2024 18:39:58 -0700 Subject: [PATCH 15/16] Update gitignore --- .gitignore | 5 +++-- Package.resolved | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Package.resolved diff --git a/.gitignore b/.gitignore index 0023a53..4edcb36 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /Packages xcuserdata/ DerivedData/ -.swiftpm/configuration/registries.json -.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.swiftpm/ +xcworkspacedata .netrc +Package.resolved \ No newline at end of file diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..b5c0757 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "cache", + "kind" : "remoteSourceControl", + "location" : "https://github.com/0xLeif/Cache", + "state" : { + "revision" : "a535c68aab7bf0b42bda7a5de66b04f86e48c6e6", + "version" : "2.1.0" + } + } + ], + "version" : 2 +} From f46ce321c88e4495cdfcd3b82f7cc60c17c53349 Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 7 Mar 2024 18:40:46 -0700 Subject: [PATCH 16/16] Remove .resolved --- Package.resolved | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 Package.resolved diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index b5c0757..0000000 --- a/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "cache", - "kind" : "remoteSourceControl", - "location" : "https://github.com/0xLeif/Cache", - "state" : { - "revision" : "a535c68aab7bf0b42bda7a5de66b04f86e48c6e6", - "version" : "2.1.0" - } - } - ], - "version" : 2 -}