Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
03a3fb6
Create FUNDING.yml (#12)
iletai Mar 15, 2024
c7e8842
build: upgrade package manifest to swift 6.0 and macos 14
iletai Oct 19, 2026
cf3ba4f
feat(core): implement NavigationRouter 2.0 with swift 6 strict concur…
iletai Oct 19, 2026
346ca13
test: add nested navigation and concurrency safety test suites
iletai Oct 19, 2026
1cfb97c
docs: update example app and align readme with 2.0 api
iletai Oct 19, 2026
3fbfe7e
ci: add comprehensive github actions workflows and open source standards
iletai Oct 19, 2026
20715a6
docs: add base navigation stack 2.0 implementation plan
iletai Oct 19, 2026
2b61f30
feat(router): add stack depth guard and async send helper
iletai Oct 19, 2026
e9c1aa4
feat(ui): add BaseNavigationContainer and declarative view modifiers
iletai Oct 19, 2026
6fcae7e
feat(demo): build comprehensive 3-tab interactive showcase and spec plan
iletai Oct 19, 2026
37b698f
Merge pull request #13 from iletai/audit/rebuild-baseline
iletai Oct 20, 2026
99d43a2
build(deps): bump softprops/action-gh-release from 2 to 3
dependabot[bot] Oct 20, 2026
6d10c6b
fix(ci): install swiftlint via brew before running lint job
iletai Oct 20, 2026
facb6ac
Merge pull request #16 from iletai/fix/ci-swiftlint-install
iletai Oct 20, 2026
3822f42
fix(ci): auto-detect available iPhone simulator instead of hardcoding…
iletai Oct 20, 2026
8280d1c
Merge pull request #17 from iletai/fix/ci-swiftlint-install
iletai Oct 20, 2026
b9f8ef5
build(deps): bump actions/checkout from 4 to 7
dependabot[bot] Oct 20, 2026
0b0a6c3
fix(example): restore BaseNavigation typealias for legacy views to re…
iletai Oct 20, 2026
bebd7c7
Merge pull request #18 from iletai/fix/example-build
iletai Oct 20, 2026
c746b04
docs: add comprehensive wiki, api guides, and showcase readme
iletai Oct 25, 2026
77c20c0
Merge pull request #19 from iletai/docs/wiki-and-showcase-readme
iletai Oct 25, 2026
7641997
fix(router): report rejected navigation, clamp maxDepth, present cove…
iletai Nov 2, 2026
4171bb6
chore(example): remove dead v1 views and build in Swift 6 mode
iletai Nov 2, 2026
456b6c4
ci: pin latest Xcode on macos-26, build all platforms and example, te…
iletai Nov 2, 2026
2d14311
docs: align README and wiki with 2.0 behavior, fix deep link parsing …
iletai Nov 2, 2026
18c9836
Merge pull request #20 from iletai/fix/audit-findings
iletai Nov 2, 2026
95a0489
Merge pull request #15 from iletai/dependabot/github_actions/softprop…
iletai Nov 2, 2026
a9070d1
Merge pull request #14 from iletai/dependabot/github_actions/actions/…
iletai Nov 2, 2026
836e084
chore: adopt Git Flow release process and open source community files
iletai Nov 2, 2026
cd2a7e5
Merge pull request #21 from iletai/chore/oss-release-process
iletai Nov 2, 2026
4875419
chore(release): 2.0.0
iletai Nov 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
buy_me_a_coffee: iletai
custom: ["https://www.paypal.me/iletai"]
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Question or idea
url: https://github.com/iletai/BaseNavigationStack/discussions
about: Ask questions and discuss ideas in GitHub Discussions.
- name: Security vulnerability
url: https://github.com/iletai/BaseNavigationStack/security/advisories/new
about: Report security issues privately.
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Description
<!-- Describe your changes in detail -->

## Motivation & Context
<!-- Why is this change required? What problem does it solve? -->

## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation / CI update

## Checklist:
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed (`swift test`).
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
114 changes: 114 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: CI

on:
push:
branches: [main, develop, 'release/**', 'hotfix/**']
pull_request:
branches: [main, develop, 'release/**', 'hotfix/**']

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

env:
SWIFTLINT_VERSION: 0.65.1

jobs:
lint:
name: SwiftLint
runs-on: macos-26
steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Install SwiftLint ${{ env.SWIFTLINT_VERSION }}
run: |
curl -sSL -o swiftlint.zip "https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/portable_swiftlint.zip"
unzip -q swiftlint.zip -d "$RUNNER_TEMP/swiftlint"
echo "$RUNNER_TEMP/swiftlint" >> "$GITHUB_PATH"

- name: Run SwiftLint
run: swiftlint --strict --quiet

test-macos:
name: macOS Tests
runs-on: macos-26
steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Run Tests
run: swift test --enable-code-coverage

test-ios:
name: iOS Simulator Tests
runs-on: macos-26
steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Run iOS Simulator Tests
run: |
SIM_ID=$(xcrun simctl list devices available | grep -E "iPhone" | head -1 | grep -o -E "[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}")
if [ -z "$SIM_ID" ]; then
echo "::error::No iPhone simulator available"
exit 1
fi
echo "Selected simulator ID: $SIM_ID"
xcodebuild test \
-scheme BaseNavigationStack \
-destination "id=$SIM_ID" \
CODE_SIGNING_ALLOWED=NO

build-platforms:
name: Build (${{ matrix.platform }})
runs-on: macos-26
strategy:
fail-fast: false
matrix:
platform: [tvOS, watchOS, visionOS]
steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Build Package
run: |
xcodebuild build \
-scheme BaseNavigationStack \
-destination "generic/platform=${{ matrix.platform }}" \
CODE_SIGNING_ALLOWED=NO

build-example:
name: Build Example App
runs-on: macos-26
steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Build Example
run: |
xcodebuild build \
-project NavigationStackExample/NavigationStackExample.xcodeproj \
-scheme NavigationStackExample \
-destination 'generic/platform=iOS Simulator' \
CODE_SIGNING_ALLOWED=NO
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
- '[0-9]+.[0-9]+.[0-9]+*'

permissions:
contents: write

jobs:
release:
name: GitHub Release
runs-on: macos-26
steps:
- name: Checkout Repository
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Verify Tag Is On main
run: |
git fetch origin main
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "::error::Tag ${GITHUB_REF_NAME} is not on main. Release from main only (see CONTRIBUTING.md)."
exit 1
fi

- name: Extract Release Notes From CHANGELOG
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk -v ver="$VERSION" '
index($0, "## [" ver "]") == 1 { found = 1; next }
found && /^## \[/ { exit }
found && /^\[[^]]+\]: / { exit }
found { print }
' CHANGELOG.md > "$RUNNER_TEMP/notes.md"
if [ ! -s "$RUNNER_TEMP/notes.md" ]; then
echo "::error::No '## [$VERSION]' section in CHANGELOG.md"
exit 1
fi
cat "$RUNNER_TEMP/notes.md"

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Run Tests
run: swift test

- name: Build Package for Release
run: swift build -c release

- name: Create Release
uses: softprops/action-gh-release@v3
with:
body_path: ${{ runner.temp }}/notes.md
prerelease: ${{ contains(github.ref_name, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [BaseNavigationStack]
17 changes: 17 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
disabled_rules:
- trailing_whitespace
- line_length
- function_body_length
- type_body_length

opt_in_rules:
- empty_count
- empty_string

included:
- Sources
- Tests

excluded:
- .build
- NavigationStackExample
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog

All notable changes to this project are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [SemVer](https://semver.org).

## [Unreleased]

## [2.0.0] - 2026-11-02

### Added
- `NavigationRouter<Route, Sheet, Cover>`: one `@MainActor @Observable` router for stack, sheet, and cover.
- `BaseNavigationContainer` and `View.navigationRouter(...)`.
- `maxDepth` stack cap (default 30) and duplicate-top push guard.
- `push`, `replacePath`, `present(sheet:)`, `present(cover:)` return `Bool` (`@discardableResult`) and log rejections via `os.Logger`.
- `send(_:)` returns its `Task` so callers can await the main-actor mutation.
- tvOS 17, watchOS 10, and visionOS 1 declared in `Package.swift`.

### Changed
- **Breaking:** `swift-tools-version` 6.0 (Xcode 16+), Swift 6 language mode; minimums iOS 17 / macOS 14.
- Because `push`/`present`/`replacePath` now return `Bool`, generic single-expression closures such as `MainActor.run { router.push(x) }` infer `Bool` and warn about an unused result. Call `await router.push(x)` directly, or write `_ = router.push(x)`.
- macOS presents covers as sheets instead of ignoring them.
- A sheet and a cover can no longer be presented at the same time through the router API.
- `maxDepth` is clamped to `>= 1` on every assignment (assigning a negative value previously crashed `replacePath`); `initialPath` is truncated to `maxDepth`.

### Removed
- **Breaking:** public `Collection.subscript(safe:)` and `Array.removeLastSafe()`.
- Redundant `@unchecked Sendable` on `@MainActor` classes.

### Fixed
- v1 `BaseNavigationStack.dismiss()` pops a single-screen stack; `replaceNavigationStack(path:)` clears active modals.

## [1.0.3] - 2023-12-24

Last 1.x release (`BaseNavigationStack<ScreenView>` + `BaseViewProtocol`).

[Unreleased]: https://github.com/iletai/BaseNavigationStack/compare/2.0.0...develop
[2.0.0]: https://github.com/iletai/BaseNavigationStack/compare/1.0.3...2.0.0
[1.0.3]: https://github.com/iletai/BaseNavigationStack/releases/tag/1.0.3
85 changes: 85 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement by contacting the maintainer [@iletai](https://github.com/iletai) through a [private GitHub security advisory](https://github.com/iletai/BaseNavigationStack/security/advisories/new) or direct message. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

Loading
Loading