Skip to content

Commit 1668189

Browse files
committed
Bump Swift minimum to 5.10, update README, update CI, remove unneeded explicit AsyncKit dependency (it's exported by PostgresKit), add .editorconfig and .swift-format
1 parent fd57101 commit 1668189

File tree

6 files changed

+104
-23
lines changed

6 files changed

+104
-23
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.swift]
2+
indent_style = space
3+
indent_size = 4
4+
tab_width = 4
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+

.github/workflows/test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
api-breakage:
2727
if: ${{ github.event_name == 'pull_request' && !(github.event.pull_request.draft || false) }}
2828
runs-on: ubuntu-latest
29-
container: swift:jammy
29+
container: swift:noble
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@v4
@@ -42,18 +42,18 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
include:
45-
- postgres-image-a: 'postgres:13'
46-
postgres-image-b: 'postgres:14'
45+
- postgres-image-a: 'postgres:12'
46+
postgres-image-b: 'postgres:13'
4747
postgres-auth: 'trust'
48-
swift-image: 'swift:5.9-focal'
49-
- postgres-image-a: 'postgres:15'
50-
postgres-image-b: 'postgres:16'
51-
postgres-auth: 'md5'
5248
swift-image: 'swift:5.10-jammy'
53-
- postgres-image-a: 'postgres:15'
54-
postgres-image-b: 'postgres:16'
49+
- postgres-image-a: 'postgres:14'
50+
postgres-image-b: 'postgres:15'
51+
postgres-auth: 'md5'
52+
swift-image: 'swift:6.0-noble'
53+
- postgres-image-a: 'postgres:16'
54+
postgres-image-b: 'postgres:17'
5555
postgres-auth: 'scram-sha-256'
56-
swift-image: 'swift:6.0-jammy'
56+
swift-image: 'swift:6.1.noble'
5757
container: ${{ matrix.swift-image }}
5858
runs-on: ubuntu-latest
5959
services:
@@ -89,8 +89,8 @@ jobs:
8989
fail-fast: false
9090
matrix:
9191
include:
92-
- macos-version: macos-14
93-
xcode-version: latest
92+
- macos-version: macos-15
93+
xcode-version: latest-stable
9494
runs-on: ${{ matrix.macos-version }}
9595
env:
9696
LOG_LEVEL: debug
@@ -106,7 +106,7 @@ jobs:
106106
run: |
107107
brew upgrade || true
108108
export PATH="$(brew --prefix)/opt/postgresql@16/bin:$PATH" PGDATA=/tmp/vapor-postgres-test PGUSER="${POSTGRES_USER_A}"
109-
(brew unlink postgresql@14 || true) && brew install postgresql@16 && brew link --force postgresql@16
109+
(brew unlink postgresql@14 || true) && brew install postgresql@17 && brew link --force postgresql@16
110110
initdb --locale=C --auth-host "scram-sha-256" -U "${POSTGRES_USER_A}" --pwfile=<(echo "${POSTGRES_PASSWORD_A}")
111111
pg_ctl start --wait
112112
PGPASSWORD="${POSTGRES_PASSWORD_A}" createdb -w -O "${POSTGRES_USER_A}" "${POSTGRES_DB_A}"

.swift-format

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

Package.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version:5.10
22
import PackageDescription
33

44
let package = Package(
@@ -13,15 +13,13 @@ let package = Package(
1313
.library(name: "FluentPostgresDriver", targets: ["FluentPostgresDriver"]),
1414
],
1515
dependencies: [
16-
.package(url: "https://github.com/vapor/async-kit.git", from: "1.20.0"),
1716
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.49.0"),
1817
.package(url: "https://github.com/vapor/postgres-kit.git", from: "2.13.4"),
1918
],
2019
targets: [
2120
.target(
2221
name: "FluentPostgresDriver",
2322
dependencies: [
24-
.product(name: "AsyncKit", package: "async-kit"),
2523
.product(name: "FluentKit", package: "fluent-kit"),
2624
.product(name: "FluentSQL", package: "fluent-kit"),
2725
.product(name: "PostgresKit", package: "postgres-kit"),

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<p align="center">
2-
<picture>
3-
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/vapor/fluent-postgres-driver/assets/1130717/c2350b70-aaf1-43e1-ab79-86fc88ba8da4">
4-
<source media="(prefers-color-scheme: light)" srcset="https://github.com/vapor/fluent-postgres-driver/assets/1130717/dfc94dc2-281b-4e54-be86-549813496373">
5-
<img src="https://github.com/vapor/fluent-postgres-driver/assets/1130717/dfc94dc2-281b-4e54-be86-549813496373" height="96" alt="FluentPostgresDriver">
6-
</picture>
2+
<img src="https://design.vapor.codes/images/vapor-fluentpostgresdriver.svg" height="96" alt="FluentPostgresDriver">
73
<br>
84
<br>
95
<a href="https://docs.vapor.codes/4.0/"><img src="https://design.vapor.codes/images/readthedocs.svg" alt="Documentation"></a>
106
<a href="https://discord.gg/vapor"><img src="https://design.vapor.codes/images/discordchat.svg" alt="Team Chat"></a>
117
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a>
128
<a href="https://github.com/vapor/fluent-postgres-driver/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/vapor/fluent-postgres-driver/test.yml?event=push&style=plastic&logo=github&label=tests&logoColor=%23ccc" alt="Continuous Integration"></a>
139
<a href="https://codecov.io/github/vapor/fluent-postgres-driver"><img src="https://img.shields.io/codecov/c/github/vapor/fluent-postgres-driver?style=plastic&logo=codecov&label=codecov"></a>
14-
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift58up.svg" alt="Swift 5.8+"></a>
10+
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift510up.svg" alt="Swift 5.10+"></a>
1511
</p>
1612

1713
<br>

Sources/FluentPostgresDriver/Docs.docc/theme-settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
"fluentpsqldriver": "#336791",
99
"documentation-intro-fill": "radial-gradient(circle at top, var(--color-fluentpsqldriver) 30%, #000 100%)",
1010
"documentation-intro-accent": "var(--color-fluentpsqldriver)",
11+
"documentation-intro-eyebrow": "white",
12+
"documentation-intro-figure": "white",
13+
"documentation-intro-title": "white",
1114
"logo-base": { "dark": "#fff", "light": "#000" },
1215
"logo-shape": { "dark": "#000", "light": "#fff" },
1316
"fill": { "dark": "#000", "light": "#fff" }
1417
},
15-
"icons": { "technology": "/fluentpostgresdriver/images/vapor-fluentpostgresdriver-logo.svg" }
18+
"icons": { "technology": "/fluentpostgresdriver/images/FluentPostgresDriver/vapor-fluentpostgresdriver-logo.svg" }
1619
},
1720
"features": {
1821
"quickNavigation": { "enable": true },

0 commit comments

Comments
 (0)