From 535e2798643078f4555e68b86911df08e26a66b6 Mon Sep 17 00:00:00 2001 From: Garric Nahapetian Date: Wed, 30 Oct 2024 12:43:47 -0700 Subject: [PATCH] Add ObservedObject macro if store_prefix (#863) * Add ObservedObject macro if store_prefix * Add store_property_wrapper --- Sources/NodesGenerator/Config.swift | 1 + Sources/NodesGenerator/PresetGenerator.swift | 1 + .../Stencils/ViewController-SwiftUI.stencil | 7 ++++++- .../StencilContexts/NodeStencilContext.swift | 13 +++++++++++++ .../NodeXcodeTemplatePermutation.swift | 1 + .../NodesGeneratorTests/Support/TestFactories.swift | 2 ++ .../testNodePresetRootStencilContext.1.txt | 5 ++++- .../testNodeStencilContext.1.txt | 5 ++++- .../testNodeStencilContext_withPlugin.1.txt | 5 ++++- ...ode.ViewController-AppKitSwiftUI-mockCount-1.txt | 3 ++- ...ode.ViewController-AppKitSwiftUI-mockCount-2.txt | 3 ++- ...Node.ViewController-UIKitSwiftUI-mockCount-1.txt | 3 ++- ...Node.ViewController-UIKitSwiftUI-mockCount-2.txt | 3 ++- ...gin.ViewController-AppKitSwiftUI-mockCount-1.txt | 3 ++- ...gin.ViewController-AppKitSwiftUI-mockCount-2.txt | 3 ++- ...ugin.ViewController-UIKitSwiftUI-mockCount-1.txt | 3 ++- ...ugin.ViewController-UIKitSwiftUI-mockCount-2.txt | 3 ++- ...sts.ViewController-AppKitSwiftUI-mockCount-1.txt | 3 ++- ...sts.ViewController-AppKitSwiftUI-mockCount-2.txt | 3 ++- ...ests.ViewController-UIKitSwiftUI-mockCount-1.txt | 3 ++- ...ests.ViewController-UIKitSwiftUI-mockCount-2.txt | 3 ++- ...sts.ViewController-AppKitSwiftUI-mockCount-1.txt | 3 ++- ...sts.ViewController-AppKitSwiftUI-mockCount-2.txt | 3 ++- ...ests.ViewController-UIKitSwiftUI-mockCount-1.txt | 3 ++- ...ests.ViewController-UIKitSwiftUI-mockCount-2.txt | 3 ++- ...mutation.AppKit-SwiftUI-CreatedForPluginList.txt | 1 + ...tNodeXcodeTemplatePermutation.AppKit-SwiftUI.txt | 1 + .../testNodeXcodeTemplatePermutation.AppKit.txt | 1 + ...mplatePermutation.AppKitCreatedForPluginList.txt | 1 + .../testNodeXcodeTemplatePermutation.Custom.txt | 1 + ...mplatePermutation.CustomCreatedForPluginList.txt | 1 + ...rmutation.UIKit-SwiftUI-CreatedForPluginList.txt | 1 + ...stNodeXcodeTemplatePermutation.UIKit-SwiftUI.txt | 1 + .../testNodeXcodeTemplatePermutation.UIKit.txt | 1 + ...emplatePermutation.UIKitCreatedForPluginList.txt | 1 + .../XcodeTemplateTests/testNodeXcodeTemplate.1.txt | 10 ++++++++++ 36 files changed, 88 insertions(+), 20 deletions(-) diff --git a/Sources/NodesGenerator/Config.swift b/Sources/NodesGenerator/Config.swift index a2e1e2e49..db191ad0a 100644 --- a/Sources/NodesGenerator/Config.swift +++ b/Sources/NodesGenerator/Config.swift @@ -61,6 +61,7 @@ public struct Config: Codable, Equatable { public var isPeripheryCommentEnabled: Bool public var storePrefix: String { isObservableStoreEnabled ? "Observable" : "" } + public var storePropertyWrapper: String { isObservableStoreEnabled ? "@ObservedObject" : "" } public var isNimbleEnabled: Bool { baseTestImports.contains("Nimble") } public init( diff --git a/Sources/NodesGenerator/PresetGenerator.swift b/Sources/NodesGenerator/PresetGenerator.swift index 748f1a6fe..2ecc7ab1d 100644 --- a/Sources/NodesGenerator/PresetGenerator.swift +++ b/Sources/NodesGenerator/PresetGenerator.swift @@ -94,6 +94,7 @@ public final class PresetGenerator { contextGenericTypes: config.contextGenericTypes, workerGenericTypes: config.workerGenericTypes, storePrefix: config.storePrefix, + storePropertyWrapper: config.storePropertyWrapper, isPreviewProviderEnabled: config.isPreviewProviderEnabled, isPeripheryCommentEnabled: config.isPeripheryCommentEnabled, isNimbleEnabled: config.isNimbleEnabled diff --git a/Sources/NodesGenerator/Resources/Stencils/ViewController-SwiftUI.stencil b/Sources/NodesGenerator/Resources/Stencils/ViewController-SwiftUI.stencil index 48ab7dd93..0f287e107 100644 --- a/Sources/NodesGenerator/Resources/Stencils/ViewController-SwiftUI.stencil +++ b/Sources/NodesGenerator/Resources/Stencils/ViewController-SwiftUI.stencil @@ -52,7 +52,12 @@ internal struct {{ node_name }}View { internal weak var receiver: {{ node_name }}Receiver? /// The Store instance. - private let store: Any{{ store_prefix }}ViewStateStore<{{ node_name }}ViewState> + {% if store_property_wrapper %} + {{ store_property_wrapper }} + private var store: Any{{ store_prefix }}ViewStateStore<{{ node_name }}ViewState> + {% else %} + private let store: AnyViewStateStore<{{ node_name }}ViewState> + {% endif %} /// The initializer. /// diff --git a/Sources/NodesGenerator/StencilContexts/NodeStencilContext.swift b/Sources/NodesGenerator/StencilContexts/NodeStencilContext.swift index 78cf111e3..b24ef6177 100644 --- a/Sources/NodesGenerator/StencilContexts/NodeStencilContext.swift +++ b/Sources/NodesGenerator/StencilContexts/NodeStencilContext.swift @@ -2,6 +2,8 @@ // Copyright © 2021 Tinder (Match Group, LLC) // +// swiftlint:disable file_length + // swiftlint:disable:next type_body_length public struct NodeStencilContext: StencilContext { @@ -47,6 +49,7 @@ public struct NodeStencilContext: StencilContext { private let contextGenericTypes: [String] private let workerGenericTypes: [String] private let storePrefix: String + private let storePropertyWrapper: String private let isPreviewProviderEnabled: Bool private let isPeripheryCommentEnabled: Bool private let isNimbleEnabled: Bool @@ -96,6 +99,7 @@ public struct NodeStencilContext: StencilContext { "context_generic_types": contextGenericTypes, "worker_generic_types": workerGenericTypes, "store_prefix": storePrefix, + "store_property_wrapper": storePropertyWrapper, "is_preview_provider_enabled": isPreviewProviderEnabled, "is_periphery_comment_enabled": isPeripheryCommentEnabled, "is_nimble_enabled": isNimbleEnabled @@ -146,6 +150,7 @@ public struct NodeStencilContext: StencilContext { contextGenericTypes: [String], workerGenericTypes: [String], storePrefix: String, + storePropertyWrapper: String, isPreviewProviderEnabled: Bool, isPeripheryCommentEnabled: Bool, isNimbleEnabled: Bool @@ -194,12 +199,14 @@ public struct NodeStencilContext: StencilContext { contextGenericTypes: contextGenericTypes, workerGenericTypes: workerGenericTypes, storePrefix: storePrefix, + storePropertyWrapper: storePropertyWrapper, isPreviewProviderEnabled: isPreviewProviderEnabled, isPeripheryCommentEnabled: isPeripheryCommentEnabled, isNimbleEnabled: isNimbleEnabled ) } + // swiftlint:disable:next function_body_length public init( preset: Preset, fileHeader: String, @@ -238,6 +245,7 @@ public struct NodeStencilContext: StencilContext { contextGenericTypes: [String], workerGenericTypes: [String], storePrefix: String, + storePropertyWrapper: String, isPreviewProviderEnabled: Bool, isPeripheryCommentEnabled: Bool, isNimbleEnabled: Bool @@ -288,6 +296,7 @@ public struct NodeStencilContext: StencilContext { contextGenericTypes: contextGenericTypes, workerGenericTypes: workerGenericTypes, storePrefix: storePrefix, + storePropertyWrapper: storePropertyWrapper, isPreviewProviderEnabled: isPreviewProviderEnabled, isPeripheryCommentEnabled: isPeripheryCommentEnabled, isNimbleEnabled: isNimbleEnabled @@ -338,6 +347,7 @@ public struct NodeStencilContext: StencilContext { contextGenericTypes: [String], workerGenericTypes: [String], storePrefix: String, + storePropertyWrapper: String, isPreviewProviderEnabled: Bool, isPeripheryCommentEnabled: Bool, isNimbleEnabled: Bool @@ -386,8 +396,11 @@ public struct NodeStencilContext: StencilContext { self.contextGenericTypes = contextGenericTypes self.workerGenericTypes = workerGenericTypes self.storePrefix = storePrefix + self.storePropertyWrapper = storePropertyWrapper self.isPreviewProviderEnabled = isPreviewProviderEnabled self.isPeripheryCommentEnabled = isPeripheryCommentEnabled self.isNimbleEnabled = isNimbleEnabled } } + +// swiftlint:enable file_length diff --git a/Sources/NodesGenerator/XcodeTemplatePermutations/NodeXcodeTemplatePermutation.swift b/Sources/NodesGenerator/XcodeTemplatePermutations/NodeXcodeTemplatePermutation.swift index 87fa4ed8b..0a7f72312 100644 --- a/Sources/NodesGenerator/XcodeTemplatePermutations/NodeXcodeTemplatePermutation.swift +++ b/Sources/NodesGenerator/XcodeTemplatePermutations/NodeXcodeTemplatePermutation.swift @@ -58,6 +58,7 @@ internal struct NodeXcodeTemplatePermutation: XcodeTemplatePermutation { contextGenericTypes: config.contextGenericTypes, workerGenericTypes: config.workerGenericTypes, storePrefix: config.storePrefix, + storePropertyWrapper: config.storePropertyWrapper, isPreviewProviderEnabled: config.isPreviewProviderEnabled, isPeripheryCommentEnabled: config.isPeripheryCommentEnabled, isNimbleEnabled: config.isNimbleEnabled diff --git a/Tests/NodesGeneratorTests/Support/TestFactories.swift b/Tests/NodesGeneratorTests/Support/TestFactories.swift index f6151413c..cb3589465 100644 --- a/Tests/NodesGeneratorTests/Support/TestFactories.swift +++ b/Tests/NodesGeneratorTests/Support/TestFactories.swift @@ -105,6 +105,7 @@ extension TestFactories { contextGenericTypes: .mock(with: "contextGenericType", count: mockCount), workerGenericTypes: .mock(with: "workerGenericType", count: mockCount), storePrefix: mockCount > 0 ? "" : "", + storePropertyWrapper: mockCount > 0 ? "" : "", isPreviewProviderEnabled: mockCount > 0, isPeripheryCommentEnabled: mockCount > 0, isNimbleEnabled: mockCount > 0 @@ -153,6 +154,7 @@ extension TestFactories { contextGenericTypes: .mock(with: "contextGenericType", count: mockCount), workerGenericTypes: .mock(with: "workerGenericType", count: mockCount), storePrefix: mockCount > 0 ? "" : "", + storePropertyWrapper: mockCount > 0 ? "" : "", isPreviewProviderEnabled: mockCount > 0, isPeripheryCommentEnabled: mockCount > 0, isNimbleEnabled: mockCount > 0 diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodePresetRootStencilContext.1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodePresetRootStencilContext.1.txt index 988d66c7a..4ac2811c0 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodePresetRootStencilContext.1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodePresetRootStencilContext.1.txt @@ -1,4 +1,4 @@ -▿ 46 key/value pairs +▿ 47 key/value pairs ▿ (2 elements) - key: "analytics_imports" ▿ value: 1 element @@ -111,6 +111,9 @@ ▿ (2 elements) - key: "store_prefix" - value: "" + ▿ (2 elements) + - key: "store_property_wrapper" + - value: "" ▿ (2 elements) - key: "view_controllable_flow_type" - value: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext.1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext.1.txt index be0433539..2b31a439f 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext.1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext.1.txt @@ -1,4 +1,4 @@ -▿ 46 key/value pairs +▿ 47 key/value pairs ▿ (2 elements) - key: "analytics_imports" ▿ value: 1 element @@ -111,6 +111,9 @@ ▿ (2 elements) - key: "store_prefix" - value: "" + ▿ (2 elements) + - key: "store_property_wrapper" + - value: "" ▿ (2 elements) - key: "view_controllable_flow_type" - value: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext_withPlugin.1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext_withPlugin.1.txt index f80f776d7..5e0815cbf 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext_withPlugin.1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilContextsTests/testNodeStencilContext_withPlugin.1.txt @@ -1,4 +1,4 @@ -▿ 46 key/value pairs +▿ 47 key/value pairs ▿ (2 elements) - key: "analytics_imports" ▿ value: 1 element @@ -113,6 +113,9 @@ ▿ (2 elements) - key: "store_prefix" - value: "" + ▿ (2 elements) + - key: "store_property_wrapper" + - value: "" ▿ (2 elements) - key: "view_controllable_flow_type" - value: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-AppKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.ViewController-UIKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-AppKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.ViewController-UIKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-AppKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.ViewController-UIKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-AppKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-1.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-1.txt index 19fea7299..10cda5d91 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-1.txt @@ -38,7 +38,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-2.txt b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-2.txt index 90d7a2861..3512c67b9 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-2.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.ViewController-UIKitSwiftUI-mockCount-2.txt @@ -39,7 +39,8 @@ internal struct View { internal weak var receiver: Receiver? /// The Store instance. - private let store: AnyViewStateStore<ViewState> + + private var store: AnyViewStateStore<ViewState> /// The initializer. /// diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI-CreatedForPluginList.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI-CreatedForPluginList.txt index 75446ad39..5624bb2eb 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI-CreatedForPluginList.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI-CreatedForPluginList.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI.txt index db79e8ac8..695abca2d 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit-SwiftUI.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit.txt index f7e4b9fba..aa4ca5d89 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKit.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKitCreatedForPluginList.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKitCreatedForPluginList.txt index 4b61fc322..fc2940d7a 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKitCreatedForPluginList.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.AppKitCreatedForPluginList.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.Custom.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.Custom.txt index 0145d9666..b0f045777 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.Custom.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.Custom.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.CustomCreatedForPluginList.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.CustomCreatedForPluginList.txt index 829d3ef8a..4907d05d0 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.CustomCreatedForPluginList.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.CustomCreatedForPluginList.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI-CreatedForPluginList.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI-CreatedForPluginList.txt index 2867fba41..fe77dc640 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI-CreatedForPluginList.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI-CreatedForPluginList.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI.txt index 54d780d7b..b19466935 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit-SwiftUI.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit.txt index be8c86ca3..c0793144a 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKit.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKitCreatedForPluginList.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKitCreatedForPluginList.txt index 481efe918..3ec356c3f 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKitCreatedForPluginList.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplatePermutationTests/testNodeXcodeTemplatePermutation.UIKitCreatedForPluginList.txt @@ -74,6 +74,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" diff --git a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplateTests/testNodeXcodeTemplate.1.txt b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplateTests/testNodeXcodeTemplate.1.txt index 965b0e4ed..03d30f85e 100644 --- a/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplateTests/testNodeXcodeTemplate.1.txt +++ b/Tests/NodesGeneratorTests/__Snapshots__/XcodeTemplateTests/testNodeXcodeTemplate.1.txt @@ -77,6 +77,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -202,6 +203,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -327,6 +329,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -452,6 +455,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -577,6 +581,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -702,6 +707,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -827,6 +833,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -952,6 +959,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -1077,6 +1085,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: "" @@ -1202,6 +1211,7 @@ ▿ stateImports: 1 element - "" - storePrefix: "" + - storePropertyWrapper: "" - viewControllableFlowType: "" - viewControllableMockContents: "" - viewControllableType: ""