Skip to content

Commit 1510263

Browse files
feat!: update to 7.0.0 (#51)
* feat: add `Endpoint` and `EndpointGroup` * feat!: initial work for `7.0.0` * feat!: modernize library **ComposableRequest** is now "structured cuncurrency-first", while still retaining support for `Combine` `Publisher`s. We're now also leveraging `resultBuilder`s to simplify the code and shorten the amount of rows. * chore(deps): bump actions/checkout from 2 to 3 (#49) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump metcalfc/changelog-generator from 1.0.0 to 3.0.0 (#48) Bumps [metcalfc/changelog-generator](https://github.com/metcalfc/changelog-generator) from 1.0.0 to 3.0.0. - [Release notes](https://github.com/metcalfc/changelog-generator/releases) - [Changelog](https://github.com/metcalfc/changelog-generator/blob/main/release-notes.png) - [Commits](metcalfc/changelog-generator@v1.0.0...v3.0.0) --- updated-dependencies: - dependency-name: metcalfc/changelog-generator dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: update README.md and GitHub Actions * chore(lint): lint new code * chore(actions): remove CodeCo and add back tests * feat: add inheritance inside `EndpointBuilder` * feat: add `Static` to appear inside a chain * feat: add `Loop` `init` to loop once * feat: add `array` accessory to `AnyDecodable` * fix: remove ambiguity in `EndpointBuilder` * fix: remove `Loop` iteration ambiguities * fix: propagate loop cancellation * feat: add `ForEach` iterator * feat: simplify `OffsetProvider` namings * feat: add `store(in:)` `Endpoint` accessory * feat: add `Future` * feat: modernize `Storage` * feat: add `HandleEvents` * chore: add convenience accessories to `Storage` * feat: add `AnyDecodable`-specific `Response` init * feat: add `EndpointResolver` for custom networking Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent c0ff4fe commit 1510263

File tree

132 files changed

+4756
-5252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+4756
-5252
lines changed

.github/workflows/chatops.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 45 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,64 @@
1-
name: pull_request
1+
name: Pull Request
22

3-
on: pull_request_target
3+
on:
4+
pull_request:
5+
branches: [main]
6+
types: [opened, synchronize]
47

58
jobs:
69
# pull request-sepcific steps.
710
validate_commits:
8-
name: Conventional Commits
9-
runs-on: ubuntu-latest
11+
name: Conventional Commits
12+
runs-on: ubuntu-latest
1013

1114
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v2
14-
with:
15-
token: ${{ secrets.GITHUB_TOKEN }}
16-
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
17-
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
15+
- name: Checkout
16+
uses: actions/checkout@v3
1817
# validate commits.
19-
- name: Validate commits
20-
uses: KevinDeJong-TomTom/commisery-action@master
21-
with:
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
pull_request: ${{ github.event.number }}
24-
25-
# update the pull request message body.
26-
update_body:
27-
name: Changelog
28-
runs-on: ubuntu-latest
29-
30-
steps:
31-
- name: Checkout
32-
uses: actions/checkout@v2
33-
with:
34-
token: ${{ secrets.GITHUB_TOKEN }}
35-
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
36-
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
37-
# create the changelog.
38-
- name: Changelog
39-
id: changelog
40-
uses: metcalfc/changelog-generator@v1.0.0
41-
with:
42-
mytoken: ${{ secrets.GITHUB_TOKEN }}
43-
head-ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
44-
base-ref: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }}
45-
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
46-
continue-on-error: true
47-
# update the pull request message body.
48-
- name: Update Pull Request Description
49-
uses: riskledger/update-pr-description@v2
18+
- name: Validate commits
19+
uses: tomtom-international/commisery-action@master
5020
with:
51-
body: ${{ steps.changelog.outputs.changelog || steps.changelog.outputs.result || 'An error occured. Please populate this yourself @${{ github.event.pull_request.sender.login }}' }}
52-
token: ${{ secrets.GITHUB_TOKEN }}
21+
token: ${{ secrets.GITHUB_TOKEN }}
5322

5423
# lint code.
5524
lint:
56-
name: Lint
57-
runs-on: ubuntu-latest
25+
name: Lint
26+
runs-on: macos-latest
5827

5928
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v2
62-
with:
63-
token: ${{ secrets.GITHUB_TOKEN }}
64-
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
65-
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
29+
- name: Checkout
30+
uses: actions/checkout@v3
6631
# only lint on actual code changes.
67-
- uses: dorny/paths-filter@v2
68-
id: changes
32+
- uses: dorny/paths-filter@v2
33+
id: changes
6934
with:
70-
base: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }}
71-
filters: |
35+
base: ${{ github.base_ref }}
36+
filters: |
7237
src:
7338
- '**/*.swift'
74-
- name: Lint
75-
if: steps.changes.outputs.src == 'true'
76-
uses: norio-nomura/action-swiftlint@3.2.1
39+
- name: Lint
40+
if: steps.changes.outputs.src == 'true'
41+
run: |
42+
set -o pipefail
43+
swiftlint lint --strict --quiet | sed -E 's/^(.*):([0-9]+):([0-9]+): (warning|error|[^:]+): (.*)/::\4 title=Lint error,file=\1,line=\2,col=\3::\5\n\1:\2:\3/'
44+
45+
# test the library.
46+
build:
47+
name: Test
48+
needs: lint
49+
runs-on: macos-latest
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v3
54+
# only build on actual code changes.
55+
- uses: dorny/paths-filter@v2
56+
id: changes
7757
with:
78-
args: --strict
58+
base: ${{ github.base_ref }}
59+
filters: |
60+
src:
61+
- '**/*.swift'
62+
- name: Test
63+
if: steps.changes.outputs.src == 'true'
64+
run: swift test

.github/workflows/push.yml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,67 @@
1-
name: release
1+
name: Release
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76

87
jobs:
98
# lint code.
109
lint:
1110
name: Lint
12-
runs-on: ubuntu-latest
11+
runs-on: macos-latest
1312

1413
steps:
1514
- name: Checkout
16-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1716
# only lint on actual code changes.
1817
- uses: dorny/paths-filter@v2
1918
id: changes
2019
with:
21-
base: ${{ github.event.push.before }}
20+
base: ${{ github.base_ref }}
2221
filters: |
2322
src:
2423
- '**/*.swift'
2524
- name: Lint
2625
if: steps.changes.outputs.src == 'true'
27-
uses: norio-nomura/action-swiftlint@3.2.1
26+
run: |
27+
set -o pipefail
28+
swiftlint lint --strict --quiet | sed -E 's/^(.*):([0-9]+):([0-9]+): (warning|error|[^:]+): (.*)/::\4 title=Lint error,file=\1,line=\2,col=\3::\5\n\1:\2:\3/'
29+
30+
# build the library.
31+
build:
32+
name: Build
33+
needs: lint
34+
runs-on: macos-latest
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v3
39+
# only build on actual code changes.
40+
- uses: dorny/paths-filter@v2
41+
id: changes
2842
with:
29-
args: --strict
43+
base: ${{ github.event.push.before }}
44+
filters: |
45+
src:
46+
- '**/*.swift'
47+
- name: Build
48+
if: steps.changes.outputs.src == 'true'
49+
run: swift build
3050

3151
# release a new version.
3252
release:
3353
name: Release
34-
needs: lint
54+
needs: build
3555
runs-on: ubuntu-latest
3656

3757
steps:
3858
# checkout `main`.
3959
- name: Checkout
4060
id: checkout
41-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
62+
- name: Release version
63+
id: release-version
64+
uses: tomtom-international/commisery-action/bump@v1
4265
with:
4366
fetch-depth: 0
4467
token: ${{ secrets.GITHUB_TOKEN }}
@@ -78,7 +101,7 @@ jobs:
78101
# checkout the `main` branch.
79102
- name: Checkout
80103
id: checkout
81-
uses: actions/checkout@v2
104+
uses: actions/checkout@v3
82105
with:
83106
token: ${{ secrets.GITHUB_TOKEN }}
84107
ref: main

.github/workflows/test.yml

Lines changed: 0 additions & 107 deletions
This file was deleted.

.swiftlint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ included:
22
- Sources
33
- Tests
44

5+
disabled_rules:
6+
- type_body_length
7+
58
opt_in_rules:
6-
- anyobject_protocol
79
- array_init
810
- attributes
911
- class_delegate_protocol
@@ -23,7 +25,6 @@ opt_in_rules:
2325
- enum_case_associated_values_count
2426
- expiring_todo
2527
- explicit_enum_raw_value
26-
- explicit_top_level_acl
2728
- extension_access_modifier
2829
- fallthrough
2930
- fatal_error_message
@@ -43,8 +44,6 @@ opt_in_rules:
4344
- lower_acl_than_parent
4445
- missing_docs
4546
- modifier_order
46-
- multiline_arguments
47-
- multiline_function_chains
4847
- multiline_parameters
4948
- number_separator
5049
- operator_usage_whitespace
@@ -61,10 +60,8 @@ opt_in_rules:
6160
- sorted_first_last
6261
- sorted_imports
6362
- static_operator
64-
- switch_case_on_newline
6563
- test_case_accessibility
6664
- toggle_bool
67-
- trailing_closure
6865
- type_contents_order
6966
- unavailable_function
7067
- unneeded_parentheses_in_closure_argument
@@ -91,7 +88,10 @@ identifier_name:
9188
- y
9289
- id
9390
- iv
91+
- to
9492
- url
93+
allowed_symbols:
94+
- _
9595

9696
line_length:
9797
ignores_comments: true

0 commit comments

Comments
 (0)