-
-
Notifications
You must be signed in to change notification settings - Fork 69
Fix mishandling of URL #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e92588f
The usual round of various package cleanup
gwynne b8afa63
Fix mishandling of Foundation.URL by PostgresDataTranslation, includi…
gwynne 2d962c9
Fix typo
gwynne 9b53969
Fix accidental deletion
gwynne b99ccc5
Apply suggestions from code review
gwynne b9bdb82
Logo tweak
gwynne ac9ed3f
Apply suggestions from code review
gwynne 1728786
Update test.yml
gwynne ccba064
Disable CodeQL for now
gwynne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
groups: | ||
dependencies: | ||
patterns: | ||
- "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,23 +25,41 @@ env: | |
jobs: | ||
# Check for API breakage versus main | ||
api-breakage: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
if: ${{ github.event_name == 'pull_request' && !(github.event.pull_request.draft || false) }} | ||
runs-on: ubuntu-latest | ||
container: swift:jammy | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: { 'fetch-depth': 0 } | ||
- name: Run API breakage check action | ||
uses: vapor/ci/.github/actions/ci-swift-check-api-breakage@main | ||
- name: API breaking changes | ||
run: | | ||
git config --global --add safe.directory "${GITHUB_WORKSPACE}" | ||
swift package diagnose-api-breaking-changes origin/main | ||
|
||
dependency-graph: | ||
if: ${{ github.event_name == 'push' }} | ||
runs-on: ubuntu-latest | ||
container: swift:jammy | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Fix Git configuration | ||
run: | | ||
git config --global --add safe.directory "${GITHUB_WORKSPACE}" | ||
apt-get update && apt-get install -y curl | ||
- name: Submit dependency graph | ||
uses: vapor-community/[email protected] | ||
|
||
code-coverage: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
runs-on: ubuntu-latest | ||
container: swift:jammy | ||
services: | ||
psql-a: | ||
image: postgres:15 | ||
image: postgres:16 | ||
env: | ||
POSTGRES_USER: test_username | ||
POSTGRES_DB: test_database | ||
|
@@ -50,58 +68,60 @@ jobs: | |
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Run unit tests for coverage data | ||
run: swift test --enable-code-coverage | ||
- name: Upload coverage data | ||
uses: vapor/[email protected] | ||
|
||
gh-codeql: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runner_os: | ||
- ubuntu-latest | ||
- macos-13 | ||
runs-on: ${{ matrix.runner_os }} | ||
permissions: | ||
security-events: write | ||
runs-on: ubuntu-latest | ||
container: | ||
image: swift:5.9-jammy | ||
permissions: { actions: write, contents: read, security-events: write } | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Select appropriate Xcode version | ||
if: ${{ startsWith(matrix.runner_os, 'macos') }} | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: { xcode-version: '~14.3' } | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Mark repo safe in non-fake global config | ||
run: | | ||
git config --global --add safe.directory "${GITHUB_WORKSPACE}" | ||
- name: Check Swift compatibility | ||
id: swift-check | ||
uses: vapor/ci/.github/actions/check-compatible-swift@main | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }} | ||
uses: github/codeql-action/init@v3 | ||
with: { languages: swift } | ||
- name: Perform build | ||
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }} | ||
run: swift build | ||
- name: Run CodeQL analyze | ||
uses: github/codeql-action/analyze@v2 | ||
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }} | ||
uses: github/codeql-action/analyze@v3 | ||
|
||
linux-unit: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
postgres-image: | ||
- postgres:15 | ||
- postgres:13 | ||
- postgres:11 | ||
- postgres:16 | ||
- postgres:14 | ||
- postgres:12 | ||
swift-image: | ||
- swift:5.7-jammy | ||
- swift:5.8-jammy | ||
- swiftlang/swift:nightly-5.9-jammy | ||
- swift:5.9-jammy | ||
- swiftlang/swift:nightly-5.10-jammy | ||
- swiftlang/swift:nightly-main-jammy | ||
include: | ||
- postgres-image: postgres:15 | ||
- postgres-image: postgres:16 | ||
postgres-auth: scram-sha-256 | ||
- postgres-image: postgres:13 | ||
- postgres-image: postgres:14 | ||
postgres-auth: md5 | ||
- postgres-image: postgres:11 | ||
- postgres-image: postgres:12 | ||
postgres-auth: trust | ||
runs-on: ubuntu-latest | ||
container: ${{ matrix.swift-image }} | ||
|
@@ -116,17 +136,17 @@ jobs: | |
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }} | ||
steps: | ||
- name: Check out package | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Run local tests | ||
run: swift test | ||
|
||
linux-integration: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
runs-on: ubuntu-latest | ||
container: swift:5.8-jammy | ||
container: swift:5.9-jammy | ||
services: | ||
psql-a: | ||
image: postgres:15 | ||
image: postgres:16 | ||
env: | ||
POSTGRES_USER: test_username | ||
POSTGRES_DB: test_database | ||
|
@@ -143,10 +163,10 @@ jobs: | |
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256 | ||
steps: | ||
- name: Check out package | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: { path: 'postgres-kit' } | ||
- name: Check out fluent-postgres-driver dependent | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: { repository: 'vapor/fluent-postgres-driver', path: 'fluent-postgres-driver' } | ||
- name: Use local package | ||
run: swift package --package-path fluent-postgres-driver edit postgres-kit --path postgres-kit | ||
|
@@ -160,7 +180,7 @@ jobs: | |
matrix: | ||
xcode-version: | ||
- '~14.3' | ||
- '15.0-beta' | ||
- 'latest' | ||
runs-on: macos-13 | ||
env: | ||
POSTGRES_HOSTNAME: 127.0.0.1 | ||
|
@@ -173,11 +193,11 @@ jobs: | |
- name: Install Postgres, setup DB and auth, and wait for server start | ||
run: | | ||
export PATH="$(brew --prefix)/opt/postgresql@14/bin:$PATH" PGDATA=/tmp/vapor-postgres-test | ||
(brew unlink postgresql || true) && brew install "postgresql@14" && brew link --force "postgresql@14" | ||
(brew unlink postgresql || true) && brew install "postgresql@15" && brew link --force "postgresql@15" | ||
initdb --locale=C --auth-host "scram-sha-256" -U "${POSTGRES_USER}" --pwfile=<(echo "${POSTGRES_PASSWORD}") | ||
pg_ctl start --wait | ||
timeout-minutes: 2 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Run local tests | ||
run: swift test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// swift-tools-version:5.9 | ||
import PackageDescription | ||
|
||
let swiftSettings: [SwiftSetting] = [ | ||
.enableUpcomingFeature("ExistentialAny"), | ||
.enableUpcomingFeature("ConciseMagicFile"), | ||
.enableUpcomingFeature("ForwardTrailingClosures"), | ||
.enableUpcomingFeature("DisableOutwardActorInference"), | ||
.enableExperimentalFeature("StrictConcurrency=complete"), | ||
] | ||
|
||
let package = Package( | ||
name: "postgres-kit", | ||
platforms: [ | ||
.macOS(.v10_15), | ||
.iOS(.v13), | ||
.watchOS(.v6), | ||
.tvOS(.v13), | ||
], | ||
products: [ | ||
.library(name: "PostgresKit", targets: ["PostgresKit"]), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.20.0"), | ||
.package(url: "https://github.com/vapor/sql-kit.git", from: "3.28.0"), | ||
.package(url: "https://github.com/vapor/async-kit.git", from: "1.19.0"), | ||
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.2.0") | ||
], | ||
targets: [ | ||
.target( | ||
name: "PostgresKit", | ||
dependencies: [ | ||
.product(name: "AsyncKit", package: "async-kit"), | ||
.product(name: "PostgresNIO", package: "postgres-nio"), | ||
.product(name: "SQLKit", package: "sql-kit"), | ||
.product(name: "Atomics", package: "swift-atomics"), | ||
], | ||
swiftSettings: swiftSettings | ||
), | ||
.testTarget( | ||
name: "PostgresKitTests", | ||
dependencies: [ | ||
.target(name: "PostgresKit"), | ||
.product(name: "SQLKitBenchmark", package: "sql-kit"), | ||
], | ||
swiftSettings: swiftSettings | ||
), | ||
] | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Sources/PostgresKit/Docs.docc/images/vapor-postgreskit-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"theme": { | ||
"aside": { "border-radius": "6px", "border-style": "double", "border-width": "3px" }, | ||
"border-radius": "0", | ||
"button": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" }, | ||
"code": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" }, | ||
"color": { | ||
"psqlkit": "#336791", | ||
"documentation-intro-fill": "radial-gradient(circle at top, var(--color-psqlkit) 30%, #000 100%)", | ||
"documentation-intro-accent": "var(--color-psqlkit)", | ||
"logo-base": { "dark": "#fff", "light": "#000" }, | ||
"logo-shape": { "dark": "#000", "light": "#fff" }, | ||
"fill": { "dark": "#000", "light": "#fff" } | ||
}, | ||
"icons": { "technology": "/postgreskit/images/vapor-postgreskit-logo.svg" } | ||
}, | ||
"features": { | ||
"quickNavigation": { "enable": true }, | ||
"i18n": { "enable": true } | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.