Skip to content

Commit

Permalink
feat!: update to 7.0.0 (#51)
Browse files Browse the repository at this point in the history
* 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] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
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] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
sbertix and dependabot[bot] authored Jan 16, 2023
1 parent c0ff4fe commit 1510263
Show file tree
Hide file tree
Showing 132 changed files with 4,756 additions and 5,252 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/chatops.yml

This file was deleted.

104 changes: 45 additions & 59 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,64 @@
name: pull_request
name: Pull Request

on: pull_request_target
on:
pull_request:
branches: [main]
types: [opened, synchronize]

jobs:
# pull request-sepcific steps.
validate_commits:
name: Conventional Commits
runs-on: ubuntu-latest
name: Conventional Commits
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
- name: Checkout
uses: actions/checkout@v3
# validate commits.
- name: Validate commits
uses: KevinDeJong-TomTom/commisery-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull_request: ${{ github.event.number }}

# update the pull request message body.
update_body:
name: Changelog
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
# create the changelog.
- name: Changelog
id: changelog
uses: metcalfc/[email protected]
with:
mytoken: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
base-ref: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }}
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
continue-on-error: true
# update the pull request message body.
- name: Update Pull Request Description
uses: riskledger/update-pr-description@v2
- name: Validate commits
uses: tomtom-international/commisery-action@master
with:
body: ${{ steps.changelog.outputs.changelog || steps.changelog.outputs.result || 'An error occured. Please populate this yourself @${{ github.event.pull_request.sender.login }}' }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

# lint code.
lint:
name: Lint
runs-on: ubuntu-latest
name: Lint
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }}
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
- name: Checkout
uses: actions/checkout@v3
# only lint on actual code changes.
- uses: dorny/paths-filter@v2
id: changes
- uses: dorny/paths-filter@v2
id: changes
with:
base: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }}
filters: |
base: ${{ github.base_ref }}
filters: |
src:
- '**/*.swift'
- name: Lint
if: steps.changes.outputs.src == 'true'
uses: norio-nomura/[email protected]
- name: Lint
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail
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/'
# test the library.
build:
name: Test
needs: lint
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3
# only build on actual code changes.
- uses: dorny/paths-filter@v2
id: changes
with:
args: --strict
base: ${{ github.base_ref }}
filters: |
src:
- '**/*.swift'
- name: Test
if: steps.changes.outputs.src == 'true'
run: swift test
45 changes: 34 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,67 @@
name: release
name: Release

on:
push:
branches:
- main
branches: [main]

jobs:
# lint code.
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# only lint on actual code changes.
- uses: dorny/paths-filter@v2
id: changes
with:
base: ${{ github.event.push.before }}
base: ${{ github.base_ref }}
filters: |
src:
- '**/*.swift'
- name: Lint
if: steps.changes.outputs.src == 'true'
uses: norio-nomura/[email protected]
run: |
set -o pipefail
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/'
# build the library.
build:
name: Build
needs: lint
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3
# only build on actual code changes.
- uses: dorny/paths-filter@v2
id: changes
with:
args: --strict
base: ${{ github.event.push.before }}
filters: |
src:
- '**/*.swift'
- name: Build
if: steps.changes.outputs.src == 'true'
run: swift build

# release a new version.
release:
name: Release
needs: lint
needs: build
runs-on: ubuntu-latest

steps:
# checkout `main`.
- name: Checkout
id: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Release version
id: release-version
uses: tomtom-international/commisery-action/bump@v1
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -78,7 +101,7 @@ jobs:
# checkout the `main` branch.
- name: Checkout
id: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: main
Expand Down
107 changes: 0 additions & 107 deletions .github/workflows/test.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ included:
- Sources
- Tests

disabled_rules:
- type_body_length

opt_in_rules:
- anyobject_protocol
- array_init
- attributes
- class_delegate_protocol
Expand All @@ -23,7 +25,6 @@ opt_in_rules:
- enum_case_associated_values_count
- expiring_todo
- explicit_enum_raw_value
- explicit_top_level_acl
- extension_access_modifier
- fallthrough
- fatal_error_message
Expand All @@ -43,8 +44,6 @@ opt_in_rules:
- lower_acl_than_parent
- missing_docs
- modifier_order
- multiline_arguments
- multiline_function_chains
- multiline_parameters
- number_separator
- operator_usage_whitespace
Expand All @@ -61,10 +60,8 @@ opt_in_rules:
- sorted_first_last
- sorted_imports
- static_operator
- switch_case_on_newline
- test_case_accessibility
- toggle_bool
- trailing_closure
- type_contents_order
- unavailable_function
- unneeded_parentheses_in_closure_argument
Expand All @@ -91,7 +88,10 @@ identifier_name:
- y
- id
- iv
- to
- url
allowed_symbols:
- _

line_length:
ignores_comments: true
Expand Down
Loading

0 comments on commit 1510263

Please sign in to comment.