Skip to content

Commit b710b19

Browse files
artus9033ddolny
andcommitted
feat: main branch
Co-authored-by: ddolny <[email protected]>
0 parents  commit b710b19

File tree

297 files changed

+37263
-0
lines changed

Some content is hidden

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

297 files changed

+37263
-0
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: Microsoft
2+
NamespaceIndentation: All

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
lib/
3+
react-native.config.js
4+
**/third_party/

.eslintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"root": true,
3+
"extends": ["@react-native", "plugin:prettier/recommended"],
4+
"rules": {
5+
"react/react-in-jsx-scope": "off"
6+
}
7+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 🐛 Bug report
2+
description: Report a reproducible bug or regression in this library.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Bug report
9+
10+
👋 Hi!
11+
12+
**Please fill the following carefully before opening a new issue ❗**
13+
*(Your issue may be closed if it doesn't provide the required pieces of information)*
14+
- type: checkboxes
15+
attributes:
16+
label: Before submitting a new issue
17+
description: Please perform simple checks first.
18+
options:
19+
- label: I tested using the latest version of the library, as the bug might be already fixed.
20+
required: true
21+
- label: I tested using a [supported version](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md) of react native.
22+
required: true
23+
- label: I checked for possible duplicate issues, with possible answers.
24+
required: true
25+
- type: textarea
26+
id: summary
27+
attributes:
28+
label: Bug summary
29+
description: |
30+
Provide a clear and concise description of what the bug is.
31+
If needed, you can also provide other samples: error messages / stack traces, screenshots, gifs, etc.
32+
validations:
33+
required: true
34+
- type: input
35+
id: library-version
36+
attributes:
37+
label: Library version
38+
description: What version of the library are you using?
39+
placeholder: "x.x.x"
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: react-native-info
44+
attributes:
45+
label: Environment info
46+
description: Run `react-native info` in your terminal and paste the results here.
47+
render: shell
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: steps-to-reproduce
52+
attributes:
53+
label: Steps to reproduce
54+
description: |
55+
You must provide a clear list of steps and code to reproduce the problem.
56+
value: |
57+
1. …
58+
2. …
59+
validations:
60+
required: true
61+
- type: input
62+
id: reproducible-example
63+
attributes:
64+
label: Reproducible example repository
65+
description: Please provide a link to a repository on GitHub with a reproducible example.
66+
render: js
67+
validations:
68+
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: Feature Request 💡
4+
url: https://github.com/callstackincubator/ReactNativeOttrelite/discussions/new?category=ideas
5+
about: If you have a feature request, please create a new discussion on GitHub.
6+
- name: Discussions on GitHub 💬
7+
url: https://github.com/callstackincubator/ReactNativeOttrelite/discussions
8+
about: If this library works as promised but you need help, please ask questions there.

.github/actions/setup/action.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Setup pnpm
13+
uses: pnpm/action-setup@v4
14+
with:
15+
run_install: false
16+
17+
- name: Restore dependencies
18+
id: pnpm-cache
19+
uses: actions/cache/restore@v4
20+
with:
21+
path: |
22+
**/node_modules
23+
pnpm-lock.yaml
24+
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
25+
restore-keys: |
26+
${{ runner.os }}-pnpm-${{ hashFiles('pnpm.lock') }}
27+
${{ runner.os }}-pnpm-
28+
29+
- name: Install dependencies
30+
if: steps.pnpm-cache.outputs.cache-hit != 'true'
31+
run: pnpm install --frozen-lockfile
32+
shell: bash
33+
34+
- name: Cache dependencies
35+
if: steps.pnpm-cache.outputs.cache-hit != 'true'
36+
uses: actions/cache/save@v4
37+
with:
38+
path: |
39+
**/node_modules
40+
pnpm-lock.yaml
41+
key: ${{ steps.pnpm-cache.outputs.cache-primary-key }}

.github/workflows/ci-cd.yml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: CI/CD
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
merge_group:
10+
types:
11+
- checks_requested
12+
13+
concurrency: ${{ github.workflow }}-${{ github.ref }}
14+
15+
jobs:
16+
lint:
17+
name: Lint
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: 'true'
24+
25+
- name: Setup
26+
uses: ./.github/actions/setup
27+
28+
- name: Lint files
29+
run: pnpm run lint
30+
31+
- name: Typecheck files
32+
run: pnpm run typecheck
33+
34+
build-packages:
35+
name: Build packages
36+
runs-on: ubuntu-latest
37+
needs: lint
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
with:
42+
submodules: 'true'
43+
44+
- name: Setup
45+
uses: ./.github/actions/setup
46+
47+
- name: Build packages
48+
run: pnpm run build
49+
50+
test:
51+
name: Run tests
52+
runs-on: ubuntu-latest
53+
needs: build-packages
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
with:
58+
submodules: 'true'
59+
60+
- name: Setup
61+
uses: ./.github/actions/setup
62+
63+
- name: Run unit tests
64+
run: pnpm run test --maxWorkers=2 --coverage
65+
66+
docs:
67+
name: Build and deploy docs
68+
runs-on: ubuntu-latest
69+
needs: build-packages
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
with:
74+
submodules: 'true'
75+
76+
- name: Setup
77+
uses: ./.github/actions/setup
78+
79+
- name: Build docs
80+
run: pnpm run build:docs
81+
82+
# TODO: publish docs
83+
84+
# TODO: enable building demo apps
85+
# build-android:
86+
# name: Build Android demo app
87+
# runs-on: ubuntu-latest
88+
# needs: [build-packages]
89+
# steps:
90+
# - name: Checkout
91+
# uses: actions/checkout@v4
92+
# with:
93+
# submodules: 'true'
94+
95+
# - name: Setup
96+
# uses: ./.github/actions/setup
97+
98+
# - name: Build packages
99+
# run: pnpm run build
100+
101+
# - name: Install JDK
102+
# uses: actions/setup-java@v4
103+
# with:
104+
# distribution: 'zulu'
105+
# java-version: '17'
106+
107+
# - name: Finalize Android SDK
108+
# run: |
109+
# /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
110+
111+
# - name: Cache Gradle
112+
# uses: actions/cache@v4
113+
# with:
114+
# path: |
115+
# ~/.gradle/wrapper
116+
# ~/.gradle/caches
117+
# key: ${{ runner.os }}-gradle-${{ hashFiles('examples/rn-app/android/gradle/wrapper/gradle-wrapper.properties') }}
118+
# restore-keys: |
119+
# ${{ runner.os }}-gradle-
120+
121+
# - name: Build example for Android
122+
# env:
123+
# JAVA_OPTS: '-XX:MaxHeapSize=6g'
124+
# run: |
125+
# pnpm run build:demo:android
126+
127+
# build-ios:
128+
# name: Build iOS demo app
129+
# runs-on: macos-latest
130+
# needs: [build-packages]
131+
# steps:
132+
# - name: Checkout
133+
# uses: actions/checkout@v4
134+
# with:
135+
# submodules: 'true'
136+
137+
# - name: Setup
138+
# uses: ./.github/actions/setup
139+
140+
# - name: Build packages
141+
# run: pnpm run build
142+
143+
# - name: Restore Cocoapods
144+
# id: cocoapods-cache
145+
# uses: actions/cache/restore@v4
146+
# with:
147+
# path: |
148+
# **/ios/Pods
149+
# key: ${{ runner.os }}-cocoapods-${{ hashFiles('examples/rn-app/ios/Podfile.lock') }}
150+
# restore-keys: |
151+
# ${{ runner.os }}-cocoapods-
152+
153+
# - name: Install Cocoapods
154+
# run: |
155+
# cd examples/rn-app/ios
156+
# pod install
157+
# env:
158+
# NO_FLIPPER: 1
159+
160+
# - name: Cache Cocoapods
161+
# uses: actions/cache/save@v4
162+
# with:
163+
# path: |
164+
# **/ios/Pods
165+
# key: ${{ steps.cocoapods-cache.outputs.cache-key }}
166+
167+
# - name: Build example for iOS
168+
# run: |
169+
# pnpm run build:demo:ios

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
32+
# Android/IJ
33+
#
34+
.classpath
35+
.cxx
36+
.gradle
37+
.idea
38+
.project
39+
.settings
40+
local.properties
41+
android.iml
42+
43+
# node.js
44+
#
45+
node_modules/
46+
npm-debug.log
47+
48+
# BUCK
49+
buck-out/
50+
\.buckd/
51+
android/app/libs
52+
android/keystores/debug.keystore
53+
54+
# Expo
55+
.expo/
56+
57+
# Nitrogen
58+
nitrogen
59+
60+
# build outputs
61+
lib/
62+
63+
# trace recordings (dev)
64+
trace_file.perfetto-trace

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.5.0

.prettierrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"quoteProps": "consistent",
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"useTabs": false,
7+
"importOrder": [
8+
"^node:.*$",
9+
"^[@a-zA-Z]",
10+
"^(?![./])",
11+
"^\\.\\./.*",
12+
"^\\./.*"
13+
],
14+
"importOrderSeparation": true,
15+
"importOrderSortSpecifiers": true,
16+
"plugins": ["@trivago/prettier-plugin-sort-imports"]
17+
}

0 commit comments

Comments
 (0)