Skip to content

Commit 8b3e542

Browse files
authored
Merge pull request #1 from ANSCoder/feature/catalog-redesign
Feature/catalog redesign
2 parents b70c05a + 7d44fff commit 8b3e542

201 files changed

Lines changed: 8788 additions & 2120 deletions

File tree

Some content is hidden

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

‎.coderabbit.yaml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: en-US
3+
reviews:
4+
profile: assertive
5+
request_changes_workflow: false
6+
high_level_summary: true
7+
poem: false
8+
review_status: true
9+
collapse_walkthrough: true
10+
auto_review:
11+
enabled: true
12+
drafts: false
13+
base_branches:
14+
- main
15+
path_filters:
16+
- "!docs/media/**"
17+
- "!**/*.pbxproj"
18+
- "!**/Assets.xcassets/**"
19+
path_instructions:
20+
- path: "Sources/**/*.swift"
21+
instructions: |
22+
Public library code. Check: Swift 6 data-race safety (no unchecked Sendable or unsafe escape hatches without a written invariant),
23+
structured concurrency over unstructured Task and DispatchQueue, doc comment with example on every public declaration,
24+
no force unwraps, UIKit/SwiftUI code inside `#if canImport(UIKit)`, Foundation code builds on macOS,
25+
and no breaking public API change without a CHANGELOG entry.
26+
- path: "Tests/**/*.swift"
27+
instructions: |
28+
Tests should assert behavior, cover edge cases (empty, out of range, non-ASCII), avoid time and locale dependence,
29+
and mark UIKit or SwiftUI tests @MainActor.
30+
- path: "Example/**/*.swift"
31+
instructions: |
32+
Demo app. Check accessibility (Dynamic Type, VoiceOver labels, Reduce Motion, no color-only status),
33+
cancellation-aware async work (`.task(id:)` over unstructured Task), and that every Example case has info, playHint and demo.
34+
- path: ".github/**"
35+
instructions: |
36+
Workflows must use least-privilege `permissions`, never run untrusted PR code under pull_request_target,
37+
and keep action versions current.
38+
chat:
39+
auto_reply: true

‎.editorconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{yml,yaml,json,md}]
12+
indent_size = 2
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ANSCoder
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Bug report
2+
description: Something does not behave as documented
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
id: what
7+
attributes:
8+
label: What happened
9+
description: What you expected and what you got.
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: repro
14+
attributes:
15+
label: Minimal reproduction
16+
description: A few lines of code is ideal.
17+
render: swift
18+
validations:
19+
required: true
20+
- type: input
21+
id: version
22+
attributes:
23+
label: Package version
24+
placeholder: "1.0.0"
25+
validations:
26+
required: true
27+
- type: input
28+
id: env
29+
attributes:
30+
label: Xcode and OS
31+
placeholder: "Xcode 26.0, iOS 26.0 simulator"
32+
validations:
33+
required: true

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question or idea
4+
url: https://github.com/ANSCoder/Swift-Extension/discussions
5+
about: Ask a question or float an idea before opening an issue.
6+
- name: Report a security problem
7+
url: https://github.com/ANSCoder/Swift-Extension/security/advisories/new
8+
about: Please report vulnerabilities privately.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: New extension
2+
description: Suggest a helper that belongs in this package
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: The problem
9+
description: What do you write by hand today?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: api
14+
attributes:
15+
label: Proposed API
16+
description: The call site you would like to write.
17+
render: swift
18+
validations:
19+
required: true
20+
- type: checkboxes
21+
id: scope
22+
attributes:
23+
label: Fit
24+
options:
25+
- label: It needs no third-party dependency
26+
required: true
27+
- label: It works on its own, in a single file
28+
required: true

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## What and why
2+
3+
<!-- One or two sentences. Link the issue: Fixes # -->
4+
5+
## Type of change
6+
7+
- [ ] New extension
8+
- [ ] Bug fix
9+
- [ ] Breaking change
10+
- [ ] Documentation, CI or tooling
11+
12+
## Checklist
13+
14+
- [ ] The new or changed API has a `///` doc comment with a usage example
15+
- [ ] There is a test, and `swift test` and the iOS simulator tests pass
16+
- [ ] `xcrun swift-format lint --strict --recursive Sources Tests` is clean
17+
- [ ] New UI supports Dynamic Type, VoiceOver and Reduce Motion
18+
- [ ] No new third-party dependency
19+
- [ ] `CHANGELOG.md` has an entry under **Unreleased**

‎.github/copilot-instructions.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Review instructions
2+
3+
This is a Swift package of small extensions for Foundation, UIKit and SwiftUI. Review for:
4+
5+
- **Concurrency (Swift 6 mode).** No `@unchecked Sendable`, `nonisolated(unsafe)` or `@preconcurrency` without a written invariant. Prefer structured concurrency. No `DispatchQueue` timers or semaphores. UI code is `@MainActor`.
6+
- **Public API.** Every public declaration has a `///` comment with a short example. Names follow the Swift API Design Guidelines. No breaking change without a `breaking` label and a CHANGELOG entry.
7+
- **Safety.** No force unwraps, `try!` or `fatalError` in `Sources`. Inputs at boundaries are validated.
8+
- **Accessibility.** New UI supports Dynamic Type, VoiceOver and Reduce Motion, and never signals state by color alone.
9+
- **Platforms.** UIKit and SwiftUI code stays inside `#if canImport(UIKit)`. Foundation code must build on macOS.
10+
- **Dependencies.** No third-party dependencies.
11+
- **Tests.** Behavior changes come with tests.

‎.github/dependabot.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
labels: [dependencies]
8+
commit-message:
9+
prefix: ci
10+
- package-ecosystem: swift
11+
directory: /
12+
schedule:
13+
interval: weekly
14+
labels: [dependencies]

‎.github/labeler.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
library:
2+
- changed-files:
3+
- any-glob-to-any-file: ["Sources/**"]
4+
tests:
5+
- changed-files:
6+
- any-glob-to-any-file: ["Tests/**", "Example/Swift-ExtensionTests/**"]
7+
example-app:
8+
- changed-files:
9+
- any-glob-to-any-file: ["Example/**"]
10+
documentation:
11+
- changed-files:
12+
- any-glob-to-any-file: ["**/*.md", "Sources/**/*.docc/**", "docs/**"]
13+
ci:
14+
- changed-files:
15+
- any-glob-to-any-file: [".github/**", "dangerfile.js", ".swift-format", ".coderabbit.yaml"]
16+
dependencies:
17+
- changed-files:
18+
- any-glob-to-any-file: ["Package.swift"]

0 commit comments

Comments
 (0)