@youversion/platform-react-native 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc.json +104 -0
- package/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +319 -0
- package/LICENSE +201 -0
- package/README.md +562 -0
- package/RELEASING.md +85 -0
- package/android/build.gradle +43 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/assets/github-reactNative-sdk-banner.png +0 -0
- package/build/api/bible.d.ts +26 -0
- package/build/api/bible.d.ts.map +1 -0
- package/build/api/bible.js +32 -0
- package/build/api/bible.js.map +1 -0
- package/build/api/highlights.d.ts +109 -0
- package/build/api/highlights.d.ts.map +1 -0
- package/build/api/highlights.js +49 -0
- package/build/api/highlights.js.map +1 -0
- package/build/api/index.d.ts +27 -0
- package/build/api/index.d.ts.map +1 -0
- package/build/api/index.js +13 -0
- package/build/api/index.js.map +1 -0
- package/build/api/languages.d.ts +11 -0
- package/build/api/languages.d.ts.map +1 -0
- package/build/api/languages.js +13 -0
- package/build/api/languages.js.map +1 -0
- package/build/api/users.d.ts +20 -0
- package/build/api/users.d.ts.map +1 -0
- package/build/api/users.js +26 -0
- package/build/api/users.js.map +1 -0
- package/build/api/votd.d.ts +15 -0
- package/build/api/votd.d.ts.map +1 -0
- package/build/api/votd.js +13 -0
- package/build/api/votd.js.map +1 -0
- package/build/components/BibleReaderView.d.ts +22 -0
- package/build/components/BibleReaderView.d.ts.map +1 -0
- package/build/components/BibleReaderView.js +18 -0
- package/build/components/BibleReaderView.js.map +1 -0
- package/build/components/BibleTextView.d.ts +18 -0
- package/build/components/BibleTextView.d.ts.map +1 -0
- package/build/components/BibleTextView.js +25 -0
- package/build/components/BibleTextView.js.map +1 -0
- package/build/components/BibleWidgetView.d.ts +23 -0
- package/build/components/BibleWidgetView.d.ts.map +1 -0
- package/build/components/BibleWidgetView.js +17 -0
- package/build/components/BibleWidgetView.js.map +1 -0
- package/build/components/SignInWithYouVersionButton.d.ts +37 -0
- package/build/components/SignInWithYouVersionButton.d.ts.map +1 -0
- package/build/components/SignInWithYouVersionButton.js +12 -0
- package/build/components/SignInWithYouVersionButton.js.map +1 -0
- package/build/components/VotdView.d.ts +11 -0
- package/build/components/VotdView.d.ts.map +1 -0
- package/build/components/VotdView.js +12 -0
- package/build/components/VotdView.js.map +1 -0
- package/build/components/index.d.ts +6 -0
- package/build/components/index.d.ts.map +1 -0
- package/build/components/index.js +6 -0
- package/build/components/index.js.map +1 -0
- package/build/index.d.ts +5 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +6 -0
- package/build/index.js.map +1 -0
- package/build/native.d.ts +22 -0
- package/build/native.d.ts.map +1 -0
- package/build/native.js +3 -0
- package/build/native.js.map +1 -0
- package/build/platform.d.ts +21 -0
- package/build/platform.d.ts.map +1 -0
- package/build/platform.js +28 -0
- package/build/platform.js.map +1 -0
- package/build/types.d.ts +320 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/commitlint.config.js +23 -0
- package/dist/youversion-platform-react-native-0.7.2.tgz +0 -0
- package/eslint.config.js +4 -0
- package/expo-module.config.json +17 -0
- package/ios/APIs/YVPBibleAPI.swift +197 -0
- package/ios/APIs/YVPHighlightsAPI.swift +105 -0
- package/ios/APIs/YVPLanguagesAPI.swift +70 -0
- package/ios/RNBibleReaderViewModule.swift +9 -0
- package/ios/RNBibleTextViewModule.swift +9 -0
- package/ios/RNBibleWidgetViewModule.swift +9 -0
- package/ios/RNSignInWithYouVersionButtonModule.swift +9 -0
- package/ios/RNVotdViewModule.swift +9 -0
- package/ios/RNYouVersionPlatformModule.swift +79 -0
- package/ios/Views/YVPBibleReaderView.swift +57 -0
- package/ios/Views/YVPBibleTextView.swift +114 -0
- package/ios/Views/YVPBibleWidgetView.swift +64 -0
- package/ios/Views/YVPSignInWithYouVersionButton.swift +52 -0
- package/ios/Views/YVPVotdView.swift +35 -0
- package/ios/YVPAuthAPI.swift +77 -0
- package/ios/YVPVotdAPI.swift +20 -0
- package/ios/YVPlatform.swift +17 -0
- package/ios/YouVersionReactNative.podspec +33 -0
- package/mocks/RNYouVersionPlatform.ts +146 -0
- package/package.json +58 -0
- package/scripts/release-local.sh +224 -0
- package/scripts/sync-android-version.js +75 -0
- package/src/api/bible.ts +35 -0
- package/src/api/highlights.ts +145 -0
- package/src/api/index.ts +13 -0
- package/src/api/languages.ts +14 -0
- package/src/api/users.ts +35 -0
- package/src/api/votd.ts +20 -0
- package/src/components/BibleReaderView.tsx +52 -0
- package/src/components/BibleTextView.tsx +63 -0
- package/src/components/BibleWidgetView.tsx +45 -0
- package/src/components/SignInWithYouVersionButton.tsx +70 -0
- package/src/components/VotdView.tsx +36 -0
- package/src/components/index.ts +5 -0
- package/src/index.ts +5 -0
- package/src/native.ts +58 -0
- package/src/platform.ts +30 -0
- package/src/types.ts +382 -0
- package/tsconfig.json +9 -0
package/.releaserc.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["main"],
|
|
3
|
+
"tagFormat": "${version}",
|
|
4
|
+
"repositoryUrl": "git@github.com:youversion/platform-sdk-reactnative.git",
|
|
5
|
+
"plugins": [
|
|
6
|
+
[
|
|
7
|
+
"@semantic-release/commit-analyzer",
|
|
8
|
+
{
|
|
9
|
+
"preset": "conventionalcommits",
|
|
10
|
+
"releaseRules": [
|
|
11
|
+
{ "type": "feat", "release": "minor" },
|
|
12
|
+
{ "type": "fix", "release": "patch" },
|
|
13
|
+
{ "type": "perf", "release": "patch" },
|
|
14
|
+
{ "type": "revert", "release": "patch" },
|
|
15
|
+
{ "type": "docs", "release": false },
|
|
16
|
+
{ "type": "style", "release": false },
|
|
17
|
+
{ "type": "chore", "release": false },
|
|
18
|
+
{ "type": "refactor", "release": "patch" },
|
|
19
|
+
{ "type": "test", "release": false },
|
|
20
|
+
{ "type": "build", "release": false },
|
|
21
|
+
{ "type": "ci", "release": false }
|
|
22
|
+
],
|
|
23
|
+
"parserOpts": {
|
|
24
|
+
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"@semantic-release/release-notes-generator",
|
|
30
|
+
{
|
|
31
|
+
"preset": "conventionalcommits",
|
|
32
|
+
"writerOpts": {
|
|
33
|
+
"commitsSort": ["subject", "scope"]
|
|
34
|
+
},
|
|
35
|
+
"presetConfig": {
|
|
36
|
+
"types": [
|
|
37
|
+
{ "type": "feat", "section": "Features" },
|
|
38
|
+
{ "type": "fix", "section": "Bug Fixes" },
|
|
39
|
+
{ "type": "perf", "section": "Performance Improvements" },
|
|
40
|
+
{ "type": "revert", "section": "Reverts" },
|
|
41
|
+
{ "type": "docs", "section": "Documentation", "hidden": false },
|
|
42
|
+
{ "type": "style", "section": "Styles", "hidden": true },
|
|
43
|
+
{
|
|
44
|
+
"type": "chore",
|
|
45
|
+
"section": "Miscellaneous Chores",
|
|
46
|
+
"hidden": true
|
|
47
|
+
},
|
|
48
|
+
{ "type": "refactor", "section": "Code Refactoring" },
|
|
49
|
+
{ "type": "test", "section": "Tests", "hidden": true },
|
|
50
|
+
{ "type": "build", "section": "Build System", "hidden": true },
|
|
51
|
+
{
|
|
52
|
+
"type": "ci",
|
|
53
|
+
"section": "Continuous Integration",
|
|
54
|
+
"hidden": true
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"@semantic-release/changelog",
|
|
62
|
+
{
|
|
63
|
+
"changelogFile": "CHANGELOG.md",
|
|
64
|
+
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines."
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
"@semantic-release/npm",
|
|
69
|
+
{
|
|
70
|
+
"npmPublish": true,
|
|
71
|
+
"tarballDir": "dist"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"@semantic-release/exec",
|
|
76
|
+
{
|
|
77
|
+
"prepareCmd": "node scripts/sync-android-version.js ${nextRelease.version}"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
"@semantic-release/git",
|
|
82
|
+
{
|
|
83
|
+
"assets": [
|
|
84
|
+
"CHANGELOG.md",
|
|
85
|
+
"package.json",
|
|
86
|
+
"package-lock.json",
|
|
87
|
+
"android/build.gradle"
|
|
88
|
+
],
|
|
89
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
[
|
|
93
|
+
"@semantic-release/github",
|
|
94
|
+
{
|
|
95
|
+
"assets": [
|
|
96
|
+
{
|
|
97
|
+
"path": "dist/*.tgz",
|
|
98
|
+
"label": "Distribution package"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
]
|
|
104
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
## <small>0.7.2 (2025-11-24)</small>
|
|
6
|
+
|
|
7
|
+
* fix(release): update package name to align to SDK naming (#24) ([9d4a1d7](https://github.com/youversion/platform-sdk-reactnative/commit/9d4a1d7)), closes [#24](https://github.com/youversion/platform-sdk-reactnative/issues/24)
|
|
8
|
+
* ci(release): simplify manual release steps, align to ci (#20) ([b6ddda6](https://github.com/youversion/platform-sdk-reactnative/commit/b6ddda6)), closes [#20](https://github.com/youversion/platform-sdk-reactnative/issues/20)
|
|
9
|
+
|
|
10
|
+
## <small>0.7.1 (2025-11-20)</small>
|
|
11
|
+
|
|
12
|
+
* fix(release): aligning package name to standard (#22) ([e096edb](https://github.com/youversion/platform-sdk-reactnative/commit/e096edb)), closes [#22](https://github.com/youversion/platform-sdk-reactnative/issues/22)
|
|
13
|
+
|
|
14
|
+
## 0.7.0 (2025-11-20)
|
|
15
|
+
|
|
16
|
+
* feat(docs): update example app language for publishing release (#21) ([2abf72d](https://github.com/youversion/platform-sdk-reactnative/commit/2abf72d)), closes [#21](https://github.com/youversion/platform-sdk-reactnative/issues/21)
|
|
17
|
+
* chore: Update to use new `signIn` function (#6) ([136578f](https://github.com/youversion/platform-sdk-reactnative/commit/136578f)), closes [#6](https://github.com/youversion/platform-sdk-reactnative/issues/6)
|
|
18
|
+
|
|
19
|
+
## 0.6.0 (2025-11-18)
|
|
20
|
+
|
|
21
|
+
* fix(ci): change releaserc url to ssh to use deploy keys (#18) ([08ea4fb](https://github.com/youversion/platform-sdk-reactnative/commit/08ea4fb)), closes [#18](https://github.com/youversion/platform-sdk-reactnative/issues/18)
|
|
22
|
+
* fix(ci): disable husky commitlint hook in ci (#14) ([b08d88c](https://github.com/youversion/platform-sdk-reactnative/commit/b08d88c)), closes [#14](https://github.com/youversion/platform-sdk-reactnative/issues/14)
|
|
23
|
+
* fix(ci): remove huksy output from prepare step (#15) ([ab5efcc](https://github.com/youversion/platform-sdk-reactnative/commit/ab5efcc)), closes [#15](https://github.com/youversion/platform-sdk-reactnative/issues/15)
|
|
24
|
+
* feat: add link to platform in example app (#13) ([a5d37cf](https://github.com/youversion/platform-sdk-reactnative/commit/a5d37cf)), closes [#13](https://github.com/youversion/platform-sdk-reactnative/issues/13)
|
|
25
|
+
* chore: adjust token and commitlint # (#12) ([e3ca175](https://github.com/youversion/platform-sdk-reactnative/commit/e3ca175)), closes [#12](https://github.com/youversion/platform-sdk-reactnative/issues/12) [#9](https://github.com/youversion/platform-sdk-reactnative/issues/9)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**Note:** This changelog is automatically generated by [semantic-release](https://github.com/semantic-release/semantic-release) based on conventional commit messages. Manual edits to this file will be overwritten on the next release.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
# Contributing to YouVersion React Native SDK
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the YouVersion React Native SDK! This document provides guidelines and instructions for contributing to this project.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Code of Conduct](#code-of-conduct)
|
|
8
|
+
- [Getting Started](#getting-started)
|
|
9
|
+
- [Development Setup](#development-setup)
|
|
10
|
+
- [Conventional Commits](#conventional-commits)
|
|
11
|
+
- [Pull Request Process](#pull-request-process)
|
|
12
|
+
- [Code Style Guidelines](#code-style-guidelines)
|
|
13
|
+
- [Testing Requirements](#testing-requirements)
|
|
14
|
+
- [Release Process](#release-process)
|
|
15
|
+
|
|
16
|
+
## Code of Conduct
|
|
17
|
+
|
|
18
|
+
By participating in this project, you agree to maintain a respectful and collaborative environment. Please be kind and courteous to all contributors.
|
|
19
|
+
|
|
20
|
+
## Getting Started
|
|
21
|
+
|
|
22
|
+
1. **Fork the repository** on GitHub
|
|
23
|
+
2. **Clone your fork** locally:
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/YOUR_USERNAME/platform-sdk-reactnative.git
|
|
26
|
+
cd platform-sdk-reactnative
|
|
27
|
+
```
|
|
28
|
+
3. **Install dependencies**:
|
|
29
|
+
```bash
|
|
30
|
+
npm install
|
|
31
|
+
```
|
|
32
|
+
4. **Set up git hooks**:
|
|
33
|
+
```bash
|
|
34
|
+
npx husky install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Development Setup
|
|
38
|
+
|
|
39
|
+
### Prerequisites
|
|
40
|
+
|
|
41
|
+
- Node.js 20.x or later
|
|
42
|
+
- npm 10.x or later
|
|
43
|
+
- Xcode (for iOS development)
|
|
44
|
+
- Android Studio (for Android development)
|
|
45
|
+
|
|
46
|
+
### Available Scripts
|
|
47
|
+
|
|
48
|
+
- `npm run build` - Build the module
|
|
49
|
+
- `npm run clean` - Clean build artifacts
|
|
50
|
+
- `npm run lint` - Run ESLint
|
|
51
|
+
- `npm run test` - Run unit tests
|
|
52
|
+
- `npm run typecheck` - Run TypeScript type checking
|
|
53
|
+
- `npm run release:dry-run` - Test release process without publishing
|
|
54
|
+
|
|
55
|
+
### Running the Example App
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# iOS
|
|
59
|
+
cd example
|
|
60
|
+
npm run ios
|
|
61
|
+
|
|
62
|
+
# Android
|
|
63
|
+
cd example
|
|
64
|
+
npm run android
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Conventional Commits
|
|
68
|
+
|
|
69
|
+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) to automate versioning and changelog generation. **All commit messages must follow this format.**
|
|
70
|
+
|
|
71
|
+
### Commit Message Format
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
<type>(<scope>): <subject>
|
|
75
|
+
|
|
76
|
+
[optional body]
|
|
77
|
+
|
|
78
|
+
[optional footer]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Commit Types
|
|
82
|
+
|
|
83
|
+
- **feat**: A new feature (triggers MINOR version bump)
|
|
84
|
+
- **fix**: A bug fix (triggers PATCH version bump)
|
|
85
|
+
- **docs**: Documentation changes only
|
|
86
|
+
- **style**: Code style changes (formatting, missing semicolons, etc.)
|
|
87
|
+
- **refactor**: Code changes that neither fix bugs nor add features (triggers PATCH version bump)
|
|
88
|
+
- **perf**: Performance improvements (triggers PATCH version bump)
|
|
89
|
+
- **test**: Adding or updating tests
|
|
90
|
+
- **build**: Changes to build system or dependencies
|
|
91
|
+
- **ci**: CI configuration changes
|
|
92
|
+
- **chore**: Other changes that don't modify src or test files
|
|
93
|
+
- **revert**: Reverts a previous commit
|
|
94
|
+
|
|
95
|
+
### Breaking Changes
|
|
96
|
+
|
|
97
|
+
Breaking changes trigger a MAJOR version bump. Indicate breaking changes in one of two ways:
|
|
98
|
+
|
|
99
|
+
1. Add `!` after the type/scope:
|
|
100
|
+
```
|
|
101
|
+
feat!: remove deprecated API endpoint
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. Add `BREAKING CHANGE:` in the footer:
|
|
105
|
+
```
|
|
106
|
+
feat: update authentication flow
|
|
107
|
+
|
|
108
|
+
BREAKING CHANGE: The old auth token format is no longer supported.
|
|
109
|
+
Users must migrate to the new format.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Commit Message Examples
|
|
113
|
+
|
|
114
|
+
#### Good Examples ✅
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# New feature
|
|
118
|
+
feat(api): add support for Bible verse lookup
|
|
119
|
+
|
|
120
|
+
# Bug fix
|
|
121
|
+
fix(auth): resolve token refresh race condition
|
|
122
|
+
|
|
123
|
+
# Documentation
|
|
124
|
+
docs: update README with installation instructions
|
|
125
|
+
|
|
126
|
+
# Breaking change
|
|
127
|
+
feat(api)!: redesign Bible content API structure
|
|
128
|
+
|
|
129
|
+
BREAKING CHANGE: The Bible content API now returns a different
|
|
130
|
+
response structure. See migration guide for details.
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### Bad Examples ❌
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Missing type
|
|
137
|
+
Update readme
|
|
138
|
+
|
|
139
|
+
# Vague subject
|
|
140
|
+
fix: fix bug
|
|
141
|
+
|
|
142
|
+
# Subject too long
|
|
143
|
+
feat: add new feature that does something really cool and amazing and changes everything
|
|
144
|
+
|
|
145
|
+
# Wrong case
|
|
146
|
+
Feat: Add feature
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Scope (Optional)
|
|
150
|
+
|
|
151
|
+
The scope should specify the area of the codebase affected:
|
|
152
|
+
|
|
153
|
+
- `api` - API changes
|
|
154
|
+
- `auth` - Authentication related
|
|
155
|
+
- `bible` - Bible content features
|
|
156
|
+
- `ui` - UI components
|
|
157
|
+
- `deps` - Dependency updates
|
|
158
|
+
- `config` - Configuration changes
|
|
159
|
+
|
|
160
|
+
### Commit Message Validation
|
|
161
|
+
|
|
162
|
+
Commit messages are validated in two places:
|
|
163
|
+
|
|
164
|
+
1. **Locally** - Via Husky git hook (blocks invalid commits)
|
|
165
|
+
2. **In CI** - During pull request validation
|
|
166
|
+
|
|
167
|
+
If your commit message doesn't follow the convention, you'll see an error like:
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
⧗ input: bad commit message
|
|
171
|
+
✖ subject may not be empty [subject-empty]
|
|
172
|
+
✖ type may not be empty [type-empty]
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Pull Request Process
|
|
176
|
+
|
|
177
|
+
### Before Submitting a PR
|
|
178
|
+
|
|
179
|
+
1. **Ensure all tests pass**: `npm test`
|
|
180
|
+
2. **Run type checking**: `npm run typecheck`
|
|
181
|
+
3. **Run linting**: `npm run lint`
|
|
182
|
+
4. **Build successfully**: `npm run build`
|
|
183
|
+
5. **Use conventional commits** for all commit messages
|
|
184
|
+
|
|
185
|
+
### PR Submission
|
|
186
|
+
|
|
187
|
+
1. **Create a branch** from `main`:
|
|
188
|
+
```bash
|
|
189
|
+
git checkout -b feature/your-feature-name
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
2. **Make your changes** with conventional commits
|
|
193
|
+
|
|
194
|
+
3. **Push to your fork**:
|
|
195
|
+
```bash
|
|
196
|
+
git push origin feature/your-feature-name
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
4. **Open a Pull Request** against the `main` branch
|
|
200
|
+
|
|
201
|
+
5. **Fill out the PR template** completely
|
|
202
|
+
|
|
203
|
+
### PR Requirements
|
|
204
|
+
|
|
205
|
+
- ✅ All CI checks must pass
|
|
206
|
+
- ✅ Code must be reviewed by at least one maintainer
|
|
207
|
+
- ✅ Conventional commit format required
|
|
208
|
+
- ✅ Linear history (squash merge)
|
|
209
|
+
- ✅ No merge conflicts
|
|
210
|
+
|
|
211
|
+
### Breaking Changes in PRs
|
|
212
|
+
|
|
213
|
+
If your PR contains breaking changes:
|
|
214
|
+
|
|
215
|
+
- **Clearly mark it** in the PR title (e.g., `[BREAKING]`)
|
|
216
|
+
- **Document the breaking change** in the PR description
|
|
217
|
+
- **Provide migration instructions**
|
|
218
|
+
- **Get additional review approval**
|
|
219
|
+
|
|
220
|
+
## Code Style Guidelines
|
|
221
|
+
|
|
222
|
+
### TypeScript
|
|
223
|
+
|
|
224
|
+
- Use TypeScript for all source code
|
|
225
|
+
- Prefer `interface` over `type` for object shapes
|
|
226
|
+
- Use strict type checking (no `any` unless absolutely necessary)
|
|
227
|
+
- Export public APIs explicitly
|
|
228
|
+
|
|
229
|
+
### Naming Conventions
|
|
230
|
+
|
|
231
|
+
- **Files**: camelCase (e.g., `bibleReader.ts`)
|
|
232
|
+
- **Components**: PascalCase (e.g., `BibleReaderView`)
|
|
233
|
+
- **Functions**: camelCase (e.g., `fetchBibleContent`)
|
|
234
|
+
- **Constants**: UPPER_SNAKE_CASE (e.g., `API_BASE_URL`)
|
|
235
|
+
|
|
236
|
+
### Code Organization
|
|
237
|
+
|
|
238
|
+
- Keep files focused and single-purpose
|
|
239
|
+
- Export public APIs from `index.ts`
|
|
240
|
+
- Place tests in `__tests__` directories
|
|
241
|
+
- Place mocks in `mocks/` directory
|
|
242
|
+
|
|
243
|
+
### ESLint
|
|
244
|
+
|
|
245
|
+
This project uses ESLint with Expo module scripts configuration. Run `npm run lint` to check your code.
|
|
246
|
+
|
|
247
|
+
## Testing Requirements
|
|
248
|
+
|
|
249
|
+
### Unit Tests
|
|
250
|
+
|
|
251
|
+
- Write unit tests for all new features
|
|
252
|
+
- Maintain or improve test coverage
|
|
253
|
+
- Place tests in `src/__tests__/` with `.test.ts` or `.test.tsx` extension
|
|
254
|
+
- Use descriptive test names
|
|
255
|
+
|
|
256
|
+
### Test Structure
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
describe('ComponentName', () => {
|
|
260
|
+
it('should do something specific', () => {
|
|
261
|
+
// Arrange
|
|
262
|
+
const input = 'test';
|
|
263
|
+
|
|
264
|
+
// Act
|
|
265
|
+
const result = doSomething(input);
|
|
266
|
+
|
|
267
|
+
// Assert
|
|
268
|
+
expect(result).toBe('expected');
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Running Tests
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Run all tests
|
|
277
|
+
npm test
|
|
278
|
+
|
|
279
|
+
# Run tests in watch mode
|
|
280
|
+
npm test -- --watch
|
|
281
|
+
|
|
282
|
+
# Run tests with coverage
|
|
283
|
+
npm test -- --coverage
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Release Process
|
|
287
|
+
|
|
288
|
+
Releases are **fully automated** using semantic-release. You don't need to manually version or publish.
|
|
289
|
+
|
|
290
|
+
### How Releases Work
|
|
291
|
+
|
|
292
|
+
1. **PR is merged** to `main` with conventional commits
|
|
293
|
+
2. **Semantic-release analyzes** commits to determine version bump
|
|
294
|
+
3. **Version is bumped** automatically (in package.json, Android build.gradle)
|
|
295
|
+
4. **CHANGELOG.md is updated** with release notes
|
|
296
|
+
5. **Package is published** to npm
|
|
297
|
+
6. **GitHub release is created** with release notes
|
|
298
|
+
|
|
299
|
+
### Version Bump Rules
|
|
300
|
+
|
|
301
|
+
- `feat:` commits → MINOR version bump (0.5.0 → 0.6.0)
|
|
302
|
+
- `fix:` commits → PATCH version bump (0.5.0 → 0.5.1)
|
|
303
|
+
- `BREAKING CHANGE:` → MAJOR version bump (0.5.0 → 1.0.0)
|
|
304
|
+
- Other commit types → No release
|
|
305
|
+
|
|
306
|
+
### Manual Release (Emergency Only)
|
|
307
|
+
|
|
308
|
+
In rare cases where automation fails, see [RELEASING.md](./RELEASING.md) for manual release procedures.
|
|
309
|
+
|
|
310
|
+
## Questions?
|
|
311
|
+
|
|
312
|
+
If you have questions about contributing, please:
|
|
313
|
+
|
|
314
|
+
1. Check the [README](./README.md)
|
|
315
|
+
2. Read [RELEASING.md](./RELEASING.md)
|
|
316
|
+
3. Open a discussion on GitHub
|
|
317
|
+
4. Reach out to the maintainers
|
|
318
|
+
|
|
319
|
+
Thank you for contributing! 🎉
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|