Swiftpack.co - Swift Packages by jemmons

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by jemmons

jemmons/MyNameIsURL v0.5.1
URL Matching in Swift
⭐️ 4
🕓 4 years ago
jemmons/Elements v0.0.2
Odds and Ends in SwiftUI
⭐️ 0
🕓 3 years ago
iOS macOS
jemmons/Feep v0.2.0
Functional programming doodads.
⭐️ 0
🕓 2 years ago
jemmons/Perfidy v7.0.0
Mock service for iOS testing.
⭐️ 0
🕓 10 weeks ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Implicit `start()`
10 weeks ago
# Breaking Changes! * `start()` is now implicit with initialization of `FakeServer`. * `FakeServer.init` therefore now `throws`. * `runWith` has been removed. Instead couple initialization with a `defer` like so: ```swift let server = try FakeServer() defer { server.stop() } server.add(...) let response = await someAPI.thatHitsTheServer() ```
Calls Route handlers from main thread.
4 years ago
Previously Perfidy was calling any `Route` handlers from the thread of the NIO event loop that triggered them. But these handlers are, more often than not, closures created in tests that interacted with UI elements. So it’s exceedingly rare to see one that doesn’t immediately jump to `DispatchQueue.main` — or *should* and forgets to do so. So Perfidy does this for us now. All `Route` handlers get `DispatchQueue.main.async`’d to the main thread.
Swift Package Manager, Swift NIO, and Swift 5
4 years ago
## Swift Package Manager With built-in support in Xcode 11, Perfidy is now distributed via SwiftPM! Not only is this a *much* better integration experience for the consumer, but it lets us kill all project files (🔥). ## SwiftNIO We’ve been (gratefully!) using `GCDAsyncSocket` for networking, but it's ObjC-based. Moving to SwiftPM felt like an opportunity to do the Right Thing and swap out the back end for [SwiftNIO](https://github.com/apple/swift-nio). This should be an invisible change for consumers of the library, but obviously all networking is now traveling a different code path. So if you see something, [say something](https://github.com/jemmons/Perfidy/issues). ## Swift 5 Not a lot needed to make this happen, but Perfidy now builds for Swift 5.1 without warnings or errors.
jemmons/SessionArtist v6.0.0
Adds structure around URLSession for beautiful APIs.
⭐️ 0
🕓 10 weeks ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Moves Host to reference type. Removes Medea dependency.
3 years ago
## Moves `Host` to Reference Type The `Host` type holds a reference to a `URLSession` instance responsible for all requests. So any representation that it was a value type was half-hearted at best and misleading at worst. ## Removes dependency on `Medea` package Medea was primarily being used for its `AnyJSON` type’s ability to handle all JSON fragments. But fragments at the top level of responses are unsupported by specs like JSON:API and have never been a good idea. JSON object types are easy to provide without Medea’s help via `JSONSerlialization`. And really, even this minimal amount of JSON parsing is less common now that Codable is a thing and decoding is happening at the call site. Everyone just wants `Data`. Of the rest of it’s features, the `ValidJSONObject` type is the only that was really being used, and that's trivial to implement internally to SessionArtist. ## Breaking Changes * `Host` is now a `class` instead of a `struct`. * `Request.json(_:)` has been removed. * `Medea` types like `JSONObject`, `JSONArray`, and `ValidJSONObject` are now directly under the `SessionArtist` namespace. * Actions that threw Medea-originated errors still throw errors. But now they're of the `SessionArtist.Error` type. * `Package.swift` has been updated to version 5.2. This should mean dependencies only used for testing (like `Perfidy`) will no longer be pulled by consumers.
Swift Package Manager and iOS 13/Catalina Bug Fixes.
4 years ago
## Moves to Swift Package Manager With built-in Xcode 11 support, SPM is now a much more convenient way to manage dependencies than Carthage. It also lets me ditch all project-related files. ## iOS 13/Catalina Bug There's a bug in iOS 13/Catalina that doesn't copy the session's `httpAdditionalHeaders` over to a request until the request's task has been `resume`'d. So I manually merge the headers for affected versions.
Massive Breaking Changes
6 years ago
This changes just about everything about everything and there's not much documentation yet. Here's what the new usage looks like: `myHost.request(myEndpoint).data { /*data result handler*/ }` `myHost.request(myEndpoint).json { /*json result handler*/ }` etc. `myHost.get("/path")` is just a convenience that creates and Endpoint for you behind the scenes.
True `Result` results.
6 years ago
Moves quasi-result "responses" to actual Result results. This means non-errors are now communicated in the `success` case instead of `response`. It also means we can `flatMap` API responses now. You can read about the result monad and its usage is here: https://www.cocoawithlove.com/blog/2016/08/21/result-types-part-one.html
Throwing inits and header field constants.
7 years ago
All failable initializers are now throwing initializers instead. This gives more flexibility all around. If you want the old failable behavior, just prefix calls with `try?`. When specifying headers, the header field (key) can now either be a string or an enum case for well-known headers. For example: ``` host.get("/foo", headers: ["Content-Type": "text/html"]) //or host.get("/foo", headers: [.contentType: "text/html"]) ```
7 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics