Skip to content

Feat: Add Swift-wasm suppport to DataLoader #23

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
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
.target(
name: "DataLoader",
dependencies: [
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
]
),
Expand All @@ -30,7 +30,14 @@ let package = Package(
.product(name: "AsyncCollections", package: "async-collections"),
]
),
.testTarget(name: "DataLoaderTests", dependencies: ["DataLoader"]),
.testTarget(
name: "DataLoaderTests",
dependencies: [
"DataLoader",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
]
),
.testTarget(name: "AsyncDataLoaderTests", dependencies: ["AsyncDataLoader"]),
]
)
2 changes: 1 addition & 1 deletion Sources/DataLoader/DataLoader.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NIO
import NIOConcurrencyHelpers
import NIOCore

public enum DataLoaderFutureValue<T> {
case success(T)
Expand Down
2 changes: 1 addition & 1 deletion Sources/DataLoader/DataLoaderOptions.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NIO
import NIOCore

public struct DataLoaderOptions<Key: Hashable, Value> {
/// Default `true`. Set to `false` to disable batching, invoking
Expand Down
2 changes: 1 addition & 1 deletion Tests/DataLoaderTests/DataLoaderAbuseTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NIO
import NIOPosix
import XCTest

@testable import DataLoader
Expand Down
2 changes: 1 addition & 1 deletion Tests/DataLoaderTests/DataLoaderAsyncTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NIO
import NIOPosix
import XCTest

@testable import DataLoader
Expand Down
3 changes: 2 additions & 1 deletion Tests/DataLoaderTests/DataLoaderTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import NIO
import NIOCore
import NIOPosix
import XCTest

@testable import DataLoader
Expand Down