Skip to content

Commit 2d2891c

Browse files
committed
Merge branch 'snapshot-2.0'
2 parents b198a56 + 7398575 commit 2d2891c

File tree

1,365 files changed

+21126
-2959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,365 files changed

+21126
-2959
lines changed

.editorconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# editorconfig.org
2-
31
root = true
42

53
[*]
64
indent_style = space
7-
indent_size = 2
8-
trim_trailing_whitespace = true
5+
indent_size = 4
6+
end_of_line = lf
97
insert_final_newline = true
8+
trim_trailing_whitespace = true

.swift-format

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version" : 1,
3+
"indentation" : {
4+
"spaces" : 4
5+
},
6+
"tabWidth" : 4,
7+
"fileScopedDeclarationPrivacy" : {
8+
"accessLevel" : "private"
9+
},
10+
"spacesAroundRangeFormationOperators" : false,
11+
"indentConditionalCompilationBlocks" : false,
12+
"indentSwitchCaseLabels" : false,
13+
"lineBreakAroundMultilineExpressionChainComponents" : false,
14+
"lineBreakBeforeControlFlowKeywords" : false,
15+
"lineBreakBeforeEachArgument" : true,
16+
"lineBreakBeforeEachGenericRequirement" : true,
17+
"lineLength" : 120,
18+
"maximumBlankLines" : 1,
19+
"respectsExistingLineBreaks" : true,
20+
"prioritizeKeepingFunctionOutputTogether" : true,
21+
"rules" : {
22+
"AllPublicDeclarationsHaveDocumentation" : false,
23+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
24+
"AlwaysUseLowerCamelCase" : false,
25+
"AmbiguousTrailingClosureOverload" : true,
26+
"BeginDocumentationCommentWithOneLineSummary" : false,
27+
"DoNotUseSemicolons" : true,
28+
"DontRepeatTypeInStaticProperties" : true,
29+
"FileScopedDeclarationPrivacy" : true,
30+
"FullyIndirectEnum" : true,
31+
"GroupNumericLiterals" : true,
32+
"IdentifiersMustBeASCII" : true,
33+
"NeverForceUnwrap" : false,
34+
"NeverUseForceTry" : false,
35+
"NeverUseImplicitlyUnwrappedOptionals" : false,
36+
"NoAccessLevelOnExtensionDeclaration" : true,
37+
"NoAssignmentInExpressions" : true,
38+
"NoBlockComments" : true,
39+
"NoCasesWithOnlyFallthrough" : true,
40+
"NoEmptyTrailingClosureParentheses" : true,
41+
"NoLabelsInCasePatterns" : true,
42+
"NoLeadingUnderscores" : false,
43+
"NoParensAroundConditions" : true,
44+
"NoVoidReturnOnFunctionSignature" : true,
45+
"OmitExplicitReturns" : true,
46+
"OneCasePerLine" : true,
47+
"OneVariableDeclarationPerLine" : true,
48+
"OnlyOneTrailingClosureArgument" : true,
49+
"OrderedImports" : true,
50+
"ReplaceForEachWithForLoop" : true,
51+
"ReturnVoidInsteadOfEmptyTuple" : true,
52+
"UseEarlyExits" : false,
53+
"UseExplicitNilCheckInConditions" : false,
54+
"UseLetInEveryBoundCaseVariable" : false,
55+
"UseShorthandTypeNames" : true,
56+
"UseSingleLinePropertyGetter" : false,
57+
"UseSynthesizedInitializer" : false,
58+
"UseTripleSlashForDocumentationComments" : true,
59+
"UseWhereClausesInForLoops" : false,
60+
"ValidateDocumentationComments" : false
61+
}
62+
}

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ format:
3232
--ignore-unparsable-files \
3333
--in-place \
3434
--recursive \
35-
./Package.swift ./Sources ./Tests
35+
Package.swift ./Tests $(find ./Sources -name "*.swift" \
36+
-not -path "./Sources/Deprecated/*")
3637

3738
test-all: test-linux test-macos test-ios

Package.resolved

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 130 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,135 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version: 6.1
22

33
import PackageDescription
44

55
let package = Package(
6-
name: "swift-snapshot-testing",
7-
platforms: [
8-
.iOS(.v13),
9-
.macOS(.v10_15),
10-
.tvOS(.v13),
11-
.watchOS(.v6),
12-
],
13-
products: [
14-
.library(
15-
name: "SnapshotTesting",
16-
targets: ["SnapshotTesting"]
17-
),
18-
.library(
19-
name: "InlineSnapshotTesting",
20-
targets: ["InlineSnapshotTesting"]
21-
),
22-
.library(
23-
name: "SnapshotTestingCustomDump",
24-
targets: ["SnapshotTestingCustomDump"]
25-
),
26-
],
27-
dependencies: [
28-
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.3"),
29-
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"602.0.0"),
30-
],
31-
targets: [
32-
.target(
33-
name: "SnapshotTesting"
34-
),
35-
.testTarget(
36-
name: "SnapshotTestingTests",
37-
dependencies: [
38-
"SnapshotTesting"
39-
],
40-
exclude: [
41-
"__Fixtures__",
42-
"__Snapshots__",
43-
]
44-
),
45-
.target(
46-
name: "InlineSnapshotTesting",
47-
dependencies: [
48-
"SnapshotTesting",
49-
"SnapshotTestingCustomDump",
50-
.product(name: "SwiftParser", package: "swift-syntax"),
51-
.product(name: "SwiftSyntax", package: "swift-syntax"),
52-
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
53-
]
54-
),
55-
.testTarget(
56-
name: "InlineSnapshotTestingTests",
57-
dependencies: [
58-
"InlineSnapshotTesting"
59-
]
60-
),
61-
.target(
62-
name: "SnapshotTestingCustomDump",
63-
dependencies: [
64-
"SnapshotTesting",
65-
.product(name: "CustomDump", package: "swift-custom-dump"),
66-
]
67-
),
68-
]
6+
name: "swift-snapshot-testing",
7+
platforms: [
8+
.iOS(.v13),
9+
.macOS(.v10_15),
10+
.tvOS(.v13),
11+
.watchOS(.v6),
12+
],
13+
products: [
14+
.library(
15+
name: "XCSnapshotTesting",
16+
targets: ["XCSnapshotTesting"]
17+
),
18+
.library(
19+
name: "SnapshotTesting",
20+
targets: ["SnapshotTesting"]
21+
),
22+
.library(
23+
name: "SnapshotTestingCustomDump",
24+
targets: ["SnapshotTestingCustomDump"]
25+
),
26+
.library(
27+
name: "InlineSnapshotTesting",
28+
targets: ["InlineSnapshotTesting"]
29+
),
30+
],
31+
dependencies: [
32+
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.3"),
33+
.package(url: "https://github.com/swiftlang/swift-syntax", "601.0.0"..<"602.0.0"),
34+
],
35+
targets: [
36+
/* DEPRECATED TARGETS */
37+
.target(
38+
name: "_SnapshotTesting",
39+
path: "Sources/Deprecated/SnapshotTesting",
40+
swiftSettings: [.swiftLanguageMode(.v5)]
41+
),
42+
.target(
43+
name: "_SnapshotTestingCustomDump",
44+
dependencies: [
45+
"_SnapshotTesting",
46+
.product(name: "CustomDump", package: "swift-custom-dump"),
47+
],
48+
path: "Sources/Deprecated/SnapshotTestingCustomDump",
49+
swiftSettings: [.swiftLanguageMode(.v5)]
50+
),
51+
.target(
52+
name: "_InlineSnapshotTesting",
53+
dependencies: [
54+
"_SnapshotTesting",
55+
"_SnapshotTestingCustomDump",
56+
.product(name: "SwiftParser", package: "swift-syntax"),
57+
.product(name: "SwiftSyntax", package: "swift-syntax"),
58+
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
59+
],
60+
path: "Sources/Deprecated/InlineSnapshotTesting",
61+
swiftSettings: [.swiftLanguageMode(.v5)]
62+
),
63+
/* TARGETS */
64+
.target(
65+
name: "XCSnapshotTesting",
66+
dependencies: ["_SnapshotTesting"]
67+
),
68+
.target(
69+
name: "SnapshotTesting",
70+
dependencies: ["XCSnapshotTesting"]
71+
),
72+
.target(
73+
name: "SnapshotTestingCustomDump",
74+
dependencies: [
75+
"XCSnapshotTesting",
76+
.product(name: "CustomDump", package: "swift-custom-dump"),
77+
"_SnapshotTestingCustomDump",
78+
]
79+
),
80+
.target(
81+
name: "InlineSnapshotTesting",
82+
dependencies: [
83+
"SnapshotTesting",
84+
"SnapshotTestingCustomDump",
85+
.product(name: "SwiftParser", package: "swift-syntax"),
86+
.product(name: "SwiftSyntax", package: "swift-syntax"),
87+
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
88+
"_InlineSnapshotTesting",
89+
]
90+
),
91+
/* DEPRECATED TESTS */
92+
.testTarget(
93+
name: "_SnapshotTestingTests",
94+
dependencies: ["XCSnapshotTesting", "SnapshotTesting"],
95+
path: "Tests/Deprecated/SnapshotTestingTests",
96+
exclude: [
97+
"__Fixtures__",
98+
"__Snapshots__",
99+
],
100+
swiftSettings: [.swiftLanguageMode(.v5)]
101+
),
102+
.testTarget(
103+
name: "_InlineSnapshotTestingTests",
104+
dependencies: ["InlineSnapshotTesting"],
105+
path: "Tests/Deprecated/InlineSnapshotTestingTests",
106+
swiftSettings: [.swiftLanguageMode(.v5)]
107+
),
108+
/* TESTS */
109+
.testTarget(
110+
name: "XCSnapshotTestingTests",
111+
dependencies: ["XCSnapshotTesting"],
112+
exclude: [
113+
"__Fixtures__",
114+
"__Snapshots__",
115+
]
116+
),
117+
.testTarget(
118+
name: "SnapshotTestingTests",
119+
dependencies: ["SnapshotTesting"],
120+
exclude: ["__Snapshots__"]
121+
),
122+
.testTarget(
123+
name: "SnapshotTestingCustomDumpTests",
124+
dependencies: [
125+
"SnapshotTestingCustomDump"
126+
]
127+
),
128+
.testTarget(
129+
name: "InlineSnapshotTestingTests",
130+
dependencies: [
131+
"InlineSnapshotTesting"
132+
]
133+
),
134+
]
69135
)

[email protected]

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)