Skip to content

Commit 75b1b26

Browse files
update internal boilerplate code.
1 parent 6cc9a2f commit 75b1b26

File tree

9 files changed

+37
-18
lines changed

9 files changed

+37
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sourcery CHANGELOG
22

3-
## Main
3+
## 1.7.0
44

55
## New Features
66
- Adds `fileName` to `Type` and exposes `path` as well

SourceryRuntime/Sources/Generated/Coding.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
// swiftlint:disable vertical_whitespace trailing_newline
44

SourceryRuntime/Sources/Generated/Description.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
// swiftlint:disable vertical_whitespace
44

SourceryRuntime/Sources/Generated/Diffable.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
import Foundation
44

SourceryRuntime/Sources/Generated/Equality.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
// swiftlint:disable vertical_whitespace
44

SourceryRuntime/Sources/Generated/JSExport.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
// swiftlint:disable vertical_whitespace trailing_newline
44

SourceryRuntime/Sources/Generated/Typed.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
// swiftlint:disable vertical_whitespace
44

SourcerySwift/Sources/SourceryRuntime.content.generated.swift

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ import Foundation
573573
"""),
574574
.init(name: "Coding.generated.swift", content:
575575
"""
576-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
576+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
577577
// DO NOT EDIT
578578
// swiftlint:disable vertical_whitespace trailing_newline
579579
@@ -1416,7 +1416,7 @@ public protocol Definition: AnyObject {
14161416
"""),
14171417
.init(name: "Description.generated.swift", content:
14181418
"""
1419-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1419+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
14201420
// DO NOT EDIT
14211421
// swiftlint:disable vertical_whitespace
14221422
@@ -1730,7 +1730,8 @@ extension Type {
17301730
string += "parentName = \\(String(describing: self.parentName)), "
17311731
string += "parentTypes = \\(String(describing: self.parentTypes)), "
17321732
string += "attributes = \\(String(describing: self.attributes)), "
1733-
string += "modifiers = \\(String(describing: self.modifiers))"
1733+
string += "modifiers = \\(String(describing: self.modifiers)), "
1734+
string += "fileName = \\(String(describing: self.fileName))"
17341735
return string
17351736
}
17361737
}
@@ -1853,7 +1854,7 @@ import Foundation
18531854
"""),
18541855
.init(name: "Diffable.generated.swift", content:
18551856
"""
1856-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1857+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
18571858
// DO NOT EDIT
18581859
import Foundation
18591860
@@ -2233,6 +2234,7 @@ extension Type: Diffable {
22332234
results.append(contentsOf: DiffableResult(identifier: "parentName").trackDifference(actual: self.parentName, expected: castObject.parentName))
22342235
results.append(contentsOf: DiffableResult(identifier: "attributes").trackDifference(actual: self.attributes, expected: castObject.attributes))
22352236
results.append(contentsOf: DiffableResult(identifier: "modifiers").trackDifference(actual: self.modifiers, expected: castObject.modifiers))
2237+
results.append(contentsOf: DiffableResult(identifier: "fileName").trackDifference(actual: self.fileName, expected: castObject.fileName))
22362238
return results
22372239
}
22382240
}
@@ -2776,7 +2778,7 @@ import Foundation
27762778
"""),
27772779
.init(name: "Equality.generated.swift", content:
27782780
"""
2779-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
2781+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
27802782
// DO NOT EDIT
27812783
// swiftlint:disable vertical_whitespace
27822784
@@ -3095,6 +3097,7 @@ extension Type {
30953097
if self.parentName != rhs.parentName { return false }
30963098
if self.attributes != rhs.attributes { return false }
30973099
if self.modifiers != rhs.modifiers { return false }
3100+
if self.fileName != rhs.fileName { return false }
30983101
if self.kind != rhs.kind { return false }
30993102
return true
31003103
}
@@ -3477,6 +3480,7 @@ extension Type {
34773480
hasher.combine(self.parentName)
34783481
hasher.combine(self.attributes)
34793482
hasher.combine(self.modifiers)
3483+
hasher.combine(self.fileName)
34803484
hasher.combine(kind)
34813485
return hasher.finalize()
34823486
}
@@ -4053,7 +4057,7 @@ import Foundation
40534057
"""),
40544058
.init(name: "JSExport.generated.swift", content:
40554059
"""
4056-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
4060+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
40574061
// DO NOT EDIT
40584062
// swiftlint:disable vertical_whitespace trailing_newline
40594063
@@ -4150,6 +4154,7 @@ extension BytesRange: BytesRangeAutoJSExport {}
41504154
var supertype: Type? { get }
41514155
var attributes: AttributeList { get }
41524156
var modifiers: [SourceryModifier] { get }
4157+
var fileName: String? { get }
41534158
}
41544159
41554160
extension Class: ClassAutoJSExport {}
@@ -4248,6 +4253,7 @@ extension DictionaryType: DictionaryTypeAutoJSExport {}
42484253
var supertype: Type? { get }
42494254
var attributes: AttributeList { get }
42504255
var modifiers: [SourceryModifier] { get }
4256+
var fileName: String? { get }
42514257
}
42524258
42534259
extension Enum: EnumAutoJSExport {}
@@ -4407,6 +4413,7 @@ extension Modifier: ModifierAutoJSExport {}
44074413
var supertype: Type? { get }
44084414
var attributes: AttributeList { get }
44094415
var modifiers: [SourceryModifier] { get }
4416+
var fileName: String? { get }
44104417
}
44114418
44124419
extension Protocol: ProtocolAutoJSExport {}
@@ -4456,6 +4463,7 @@ extension Protocol: ProtocolAutoJSExport {}
44564463
var supertype: Type? { get }
44574464
var attributes: AttributeList { get }
44584465
var modifiers: [SourceryModifier] { get }
4466+
var fileName: String? { get }
44594467
}
44604468
44614469
extension Struct: StructAutoJSExport {}
@@ -4555,6 +4563,7 @@ extension TupleType: TupleTypeAutoJSExport {}
45554563
var supertype: Type? { get }
45564564
var attributes: AttributeList { get }
45574565
var modifiers: [SourceryModifier] { get }
4566+
var fileName: String? { get }
45584567
}
45594568
45604569
extension Type: TypeAutoJSExport {}
@@ -6314,10 +6323,18 @@ public typealias AttributeList = [String: [Attribute]]
63146323
/// Type modifiers, i.e. `private`, `final`
63156324
public var modifiers: [SourceryModifier]
63166325
6317-
// Path to file where the type is defined
6326+
/// Path to file where the type is defined
63186327
// sourcery: skipDescription, skipEquality, skipJSExport
6319-
/// :nodoc:
6320-
public var path: String?
6328+
public var path: String? {
6329+
didSet {
6330+
if let path = path {
6331+
fileName = (path as NSString).lastPathComponent
6332+
}
6333+
}
6334+
}
6335+
6336+
/// File name where the type was defined
6337+
public var fileName: String?
63216338
63226339
/// :nodoc:
63236340
public init(name: String = "",
@@ -6411,6 +6428,7 @@ public typealias AttributeList = [String: [Attribute]]
64116428
guard let attributes: AttributeList = aDecoder.decode(forKey: "attributes") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["attributes"])); fatalError() }; self.attributes = attributes
64126429
guard let modifiers: [SourceryModifier] = aDecoder.decode(forKey: "modifiers") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["modifiers"])); fatalError() }; self.modifiers = modifiers
64136430
self.path = aDecoder.decode(forKey: "path")
6431+
self.fileName = aDecoder.decode(forKey: "fileName")
64146432
}
64156433
64166434
/// :nodoc:
@@ -6442,6 +6460,7 @@ public typealias AttributeList = [String: [Attribute]]
64426460
aCoder.encode(self.attributes, forKey: "attributes")
64436461
aCoder.encode(self.modifiers, forKey: "modifiers")
64446462
aCoder.encode(self.path, forKey: "path")
6463+
aCoder.encode(self.fileName, forKey: "fileName")
64456464
}
64466465
// sourcery:end
64476466
}
@@ -6776,7 +6795,7 @@ import Foundation
67766795
"""),
67776796
.init(name: "Typed.generated.swift", content:
67786797
"""
6779-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
6798+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
67806799
// DO NOT EDIT
67816800
// swiftlint:disable vertical_whitespace
67826801

SourceryTests/Models/TypedSpec.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 1.6.1 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 1.7.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33
import Quick
44
import Nimble

0 commit comments

Comments
 (0)