diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ce86063..caae017 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,4 +14,4 @@ jobs: test: uses: graphqlswift/ci/.github/workflows/test.yaml@main with: - include_android: false + include_android: false \ No newline at end of file diff --git a/.github/workflows/wasm.yaml b/.github/workflows/wasm.yaml new file mode 100644 index 0000000..684b1c9 --- /dev/null +++ b/.github/workflows/wasm.yaml @@ -0,0 +1,24 @@ +name: wasm + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + # NOTE: swift tests won't compile due to usage + # of NIOPosix. But we can at least test that wasm compilation + # works, to prevent future breakages. + wasm: + name: Test wasm compilation + runs-on: ubuntu-latest + container: swift:6.1.0 + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: swiftwasm/setup-swiftwasm@v2 + with: + target: "wasm32-unknown-wasip1-threads" + - run: swift build --swift-sdk wasm32-unknown-wasip1-threads diff --git a/Package.resolved b/Package.resolved index 1465c14..49de830 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "34f315fb9047f350b535493d2e79e60dfd40675b4bfc9f7a8e4b8d79bb3dd6c5", "pins" : [ { "identity" : "async-collections", @@ -39,10 +40,10 @@ { "identity" : "swift-nio", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-nio.git", + "location" : "https://github.com/PassiveLogic/swift-nio.git", "state" : { - "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", - "version" : "2.83.0" + "branch" : "main", + "revision" : "8d2347a56b812083fe547e584de023f2668fe6fe" } }, { @@ -59,10 +60,10 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-system.git", "state" : { - "revision" : "c8a44d836fe7913603e246acab7c528c2e780168", - "version" : "1.4.0" + "revision" : "61e4ca4b81b9e09e2ec863b00c340eb13497dac6", + "version" : "1.5.0" } } ], - "version" : 2 + "version" : 3 } diff --git a/Package.swift b/Package.swift index 71dc6ba..1c9ebdc 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.10.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -13,7 +13,10 @@ let package = Package( dependencies: [ .package(url: "https://github.com/apple/swift-algorithms.git", from: "1.0.0"), .package(url: "https://github.com/adam-fowler/async-collections", from: "0.0.1"), - .package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"), + + // TODO: SM: Revert before merging. Temporarily using PL nio to test fix for NIOCore. + // .package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"), + .package(url: "https://github.com/PassiveLogic/swift-nio.git", branch: "main"), ], targets: [ .target( diff --git a/README.md b/README.md index 2745c36..eebc497 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://tldrlegal.com/license/mit-license) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FGraphQLSwift%2FDataLoader%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/GraphQLSwift/DataLoader) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FGraphQLSwift%2FDataLoader%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/GraphQLSwift/DataLoader) +[![WASI 0.1](https://github.com/GraphQLSwift/DataLoader/actions/workflows/wasm.yml/badge.svg?branch=main)](https://github.com/GraphQLSwift/DataLoader/actions/workflows/wasm.yml) DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a simplified and consistent API over various remote data sources such as databases or web services via batching and caching.