Skip to content

Commit

Permalink
v8
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jun 20, 2023
1 parent 707652b commit 35125e0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
env: pods

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI

on:
workflow_dispatch:
pull_request:
Expand All @@ -7,14 +8,13 @@ on:
- Tests/**
- .github/workflows/ci.yml
- PromiseKit.xcodeproj/**
jobs:
auto-cancel:
runs-on: ubuntu-latest
steps:
- uses: technote-space/auto-cancel-redundant-job@v1

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
linux:
needs: auto-cancel
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -31,7 +31,6 @@ jobs:

linux-code-cov:
name: linux
needs: auto-cancel
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
name: Publish

on:
workflow_dispatch:
inputs:
version:
description: Version to publish
description: semantic version to publish
required: true

concurrency:
group: publish-{{github.event.inputs.version}}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: aurelien-baudet/workflow-dispatch@v2
with:
workflow: CI
token: ${{ secrets.JAZZY_PAT }}
wait-for-completion: true
uses: ./.github/workflows/ci.yml

lint:
runs-on: macos-10.15
runs-on: macos-latest
strategy:
matrix:
xcode:
- ^10
- ^11
- ^12
- ^13
- ^14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- run: pod lib lint --fail-fast --allow-warnings
Expand All @@ -38,7 +37,7 @@ jobs:
env:
v: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # zero means “all” (or push fails)
- name: Update committed versions
Expand Down
54 changes: 7 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ pod used in many of the most popular apps in the world.

[![codecov](https://codecov.io/gh/mxcl/PromiseKit/branch/master/graph/badge.svg)](https://codecov.io/gh/mxcl/PromiseKit)

# PromiseKit 6

[Release notes and migration guide][PMK6].

# Quick Start

In your [Podfile]:
Expand All @@ -45,11 +41,13 @@ In your [Podfile]:
use_frameworks!

target "Change Me!" do
pod "PromiseKit", "~> 6.8"
pod "PromiseKit", "~> 8"
end
```

> The above gives an Xcode warning? See our [Installation Guide].
PromiseKit 8 supports recent Xcodes (13+). Some Podspecs were
[dropped as a result](https://github.com/mxcl/PromiseKit/pull/1318).
Pull requests are welcome.

PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1,
3.2, 3.3, 3.4, 4.0, 4.1, 4.2, 4.3 and 5.0 (development snapshots); iOS, macOS,
Expand All @@ -73,20 +71,6 @@ tools.

[Get Professional Support for PromiseKit with TideLift](https://tidelift.com/subscription/pkg/cocoapods-promisekit?utm_source=cocoapods-promisekit&utm_medium=referral&utm_campaign=readme).

# PromiseKit is Thousands of Hours of Work

Hey there, I’m Max Howell. I’m a prolific producer of open source software and
probably you already use some of it (I created [`brew`]). I work full-time on
open source and it’s hard; currently *I earn less than minimum wage*. Please
help me continue my work, I appreciate it 🙏🏻

<a href="https://www.patreon.com/mxcl">
<img src="https://c5.patreon.com/external/logo/[email protected]" width="160">
</a>

[Other ways to say thanks](http://mxcl.dev/#donate).

[`brew`]: https://brew.sh

# Documentation

Expand Down Expand Up @@ -121,12 +105,12 @@ All our extensions are separate repositories at the [PromiseKit organization].
Then don’t have them:

```ruby
pod "PromiseKit/CorePromise", "~> 6.8"
pod "PromiseKit/CorePromise", "~> 8"
```

> *Note:* Carthage installations come with no extensions by default.
## Choose Your Networking Library
## Networking

Promise chains commonly start with a network operation. Thus, we offer
extensions for `URLSession`:
Expand Down Expand Up @@ -155,32 +139,8 @@ func makeUrlRequest() throws -> URLRequest {
}
```

And [Alamofire]:

```swift
// pod 'PromiseKit/Alamofire' # https://github.com/PromiseKit/Alamofire-

firstly {
Alamofire
.request("http://example.com", method: .post, parameters: params)
.responseDecodable(Foo.self)
}.done { foo in
//
}.catch { error in
//
}
```

Nowadays, considering that:

* We almost always POST JSON
* We now have `JSONDecoder`
* PromiseKit now has `map` and other functional primitives
* PromiseKit (like Alamofire, but not raw-`URLSession`) also defaults to having
callbacks go to the main thread
Support for Alamofire is welcome, please submit a PR.

We recommend vanilla `URLSession`. It uses fewer black boxes and sticks closer to the metal. Alamofire was essential until the three bullet points above
became true, but nowadays it isn’t really necessary.

# Support

Expand Down

0 comments on commit 35125e0

Please sign in to comment.