Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
23fca6f
Bump swift tools version
mattesmohr Mar 15, 2024
26365f9
Enable complete concurrency checking
mattesmohr May 24, 2024
2d96478
Update test workflow
mattesmohr May 24, 2024
558f102
Make the features optionset sendable
mattesmohr Sep 2, 2024
12760a2
Make the markdown structure sendable
mattesmohr Sep 2, 2024
a2647fd
Merge branch 'main' into experimental/add-sendable-conformance
mattesmohr Oct 17, 2025
3be830a
Merge branch 'main' into experimental/add-sendable-conformance
mattesmohr Nov 24, 2025
00f6356
Merge branch 'main' into experimental/add-sendable-conformance
mattesmohr Nov 27, 2025
8277c8f
Bump swift tools version
mattesmohr Nov 28, 2025
b79b4cb
Mark the interpolationargument enum as sendable
mattesmohr Nov 28, 2025
2509f18
Mark the localizedstringkey structure as sendable
mattesmohr Nov 28, 2025
f3d9fa3
Mark the translationtable structure as sendable
mattesmohr Nov 28, 2025
76ba912
Mark the localizedstring structure as sendable
mattesmohr Nov 28, 2025
2c3bb70
Update test workflow
mattesmohr Nov 28, 2025
1a5948f
Merge branch 'main' into experimental/add-sendable-conformance
mattesmohr Dec 29, 2025
52aea0e
Mark the locale structure as sendable
mattesmohr Jan 9, 2026
71f3e07
Resolve the warnings of the provider tests
mattesmohr Jan 9, 2026
a8598de
Make the localization structure sendable
mattesmohr Jan 9, 2026
ec004fc
Mark the mediaquery structure as sendable
mattesmohr Mar 13, 2026
45d586e
Mark the sizecandidate structure as sendable
mattesmohr Mar 13, 2026
76d2740
Mark the sourcecandidate structure as sendable
mattesmohr Mar 13, 2026
3d44d03
Mark the unitpoint structure as sendable
mattesmohr Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
test-pushpull:
runs-on: ubuntu-latest
container: swift:5.9.2-jammy
container: swift:5.10.1-jammy
steps:
- uses: actions/checkout@v3
- name: Run tests
Expand Down
10 changes: 8 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:5.10

import PackageDescription

Expand Down Expand Up @@ -34,7 +34,10 @@ let package = Package(
.product(name: "Collections", package: "swift-collections"),
.product(name: "Logging", package: "swift-log"),
],
exclude: ["Abstraction/README.md", "Framework/README.md"]
exclude: ["Abstraction/README.md", "Framework/README.md"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete")
]
),
.target(
name: "HTMLKitConverter",
Expand All @@ -56,6 +59,9 @@ let package = Package(
dependencies: [
.target(name: "HTMLKit"),
.product(name: "Vapor", package: "vapor"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete")
]
),
.target(
Expand Down
8 changes: 4 additions & 4 deletions Sources/HTMLKit/Abstraction/Types/MediaQuery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
/// MediaQuery(.print, features: .resolution("300dpi"))
/// )
/// ```
public struct MediaQuery {
public struct MediaQuery: Sendable {

/// An enumeration of potential interface orientations.
public enum InterfaceOrientation {
public enum InterfaceOrientation: Sendable {

/// Indicates a landscape orientation.
case landscape
Expand All @@ -34,7 +34,7 @@ public struct MediaQuery {
}

/// An enumeration of potential media features.
public enum MediaFeature {
public enum MediaFeature: Sendable {

/// Specifies the minimum target width.
case minWidth(String)
Expand Down Expand Up @@ -120,7 +120,7 @@ public struct MediaQuery {
}

/// An enumeration of potential media devices.
public enum MediaTarget: String {
public enum MediaTarget: String, Sendable {

/// Matches all devices.
case all
Expand Down
6 changes: 3 additions & 3 deletions Sources/HTMLKit/Abstraction/Types/SizeCandidate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
/// SizeCandidate("80vw")
/// )
/// ```
public struct SizeCandidate {
public struct SizeCandidate: Sendable {

/// An enumeration of potential interface orientations.
public enum InterfaceOrientation {
public enum InterfaceOrientation: Sendable {

/// Indicates a landscape orientation.
case landscape
Expand All @@ -36,7 +36,7 @@ public struct SizeCandidate {
}

/// An enumeration of potential width conditions.
public enum SizeCondition {
public enum SizeCondition: Sendable {

/// Specifies the maximum width.
case maxWidth(String)
Expand Down
4 changes: 2 additions & 2 deletions Sources/HTMLKit/Abstraction/Types/SourceCandidate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Foundation
/// SourceCandiate("...png", width: 1680)
/// )
/// ```
public struct SourceCandidate {
public struct SourceCandidate: Sendable {

/// An enumeration of potential pixel densities.
public enum PixelDensity {
public enum PixelDensity: Sendable {

/// Specifies a 1:1 density.
case regular
Expand Down
4 changes: 2 additions & 2 deletions Sources/HTMLKit/Abstraction/Types/UnitPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
/// .center(UnitPoint(x: 50, y: 50))
/// }
/// ```
public struct UnitPoint {
public struct UnitPoint: Sendable {

/// An enumeration of potential point formats.
public enum PointFormat {
public enum PointFormat: Sendable {

/// Indicates an absolute value.
case absolute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Foundation
/// Each case corresponds to a specific data type and provides a placeholder
/// that can be used for replacing values in the localized string.
@_documentation(visibility: internal)
public enum InterpolationArgument {
public enum InterpolationArgument: Sendable {

/// Holds an integer value
case int(Int)
Expand Down
4 changes: 2 additions & 2 deletions Sources/HTMLKit/Framework/Localization/Locale.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
///
/// A locale holds information about language, region and cultural preferences.
@_documentation(visibility: internal)
public struct Locale: Hashable {
public struct Locale: Hashable, Sendable {

/// A enumeration of potential language tags
public enum Tag: String {
public enum Tag: String, Sendable {

case arabic = "ar"
case belarusian = "be"
Expand Down
6 changes: 3 additions & 3 deletions Sources/HTMLKit/Framework/Localization/Localization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// A type that represents the localization
@_documentation(visibility: internal)
public class Localization {
public struct Localization: Sendable {

/// A enumeration of errors regarding the localization rendering
public enum Errors: Error, Equatable {
Expand Down Expand Up @@ -81,14 +81,14 @@ public class Localization {
/// Sets the source directory
///
/// - Parameter source: The directory where the translations should be loaded from.
public func set(source: URL) {
public mutating func set(source: URL) {
self.tables = load(source: source)
}

/// Sets the default locale
///
/// - Parameter locale: A locale tag e.g. en-US
public func set(locale: String) {
public mutating func set(locale: String) {
self.locale = Locale(tag: locale)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// A type thats holds the information for the localization
@_documentation(visibility: internal)
public struct LocalizedString: Content {
public struct LocalizedString: Content, Sendable {

/// The key of the translation value
internal let key: LocalizedStringKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// A string key for the localization
@_documentation(visibility: internal)
public struct LocalizedStringKey {
public struct LocalizedStringKey: Sendable {

/// The key value
internal let value: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// A type that represents a translation table
///
/// A translation table stores multiple localized strings, mapping unique string keys to their corresponding translations
internal struct TranslationTable {
internal struct TranslationTable: Sendable {

/// The name of the table
internal let name: String
Expand Down
2 changes: 1 addition & 1 deletion Sources/HTMLKit/Framework/Rendering/Features.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// An option set of different features
///
/// The feature set provides the flexibility to enable experimental features if desired.
public struct Features: Swift.OptionSet {
public struct Features: Swift.OptionSet, Sendable {

public var rawValue: Int

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

internal final class Markdown {
internal struct Markdown: Sendable {

/// The markdowns characters
internal static let characters = CharacterSet(charactersIn: "*_~[`")
Expand Down
Loading
Loading