Skip to content

Commit c95e88f

Browse files
committed
Merge branch 'main' into chore/ruby-setup
2 parents 8a4bec1 + 51efde5 commit c95e88f

Some content is hidden

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

70 files changed

+5127
-1056
lines changed

.clang-format-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package/cpp/sqlite/*

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
*.pbxproj -text
22
# specific for windows script files
33
*.bat text eol=crlf
4-
.lockb binary diff=lockb

.github/workflows/build-android-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
types: [published]
66

77
jobs:
8-
build_release:
9-
name: Build Android Example App (release, new architecture)
8+
build:
9+
name: Build Android Example App (release)
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4

.github/workflows/build-android.yml

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,55 +27,18 @@ on:
2727
- "**/nitro.json"
2828

2929
jobs:
30-
build_new:
31-
name: Build Android Example App (new architecture)
30+
build:
31+
name: Build Android Example App
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v5
3535
- uses: oven-sh/setup-bun@v2
3636

3737
- name: Install npm dependencies (bun)
3838
run: bun install
3939

4040
- name: Setup JDK 17
41-
uses: actions/setup-java@v4
42-
with:
43-
distribution: "zulu"
44-
java-version: 17
45-
java-package: jdk
46-
47-
- name: Restore Gradle cache
48-
uses: actions/cache@v4
49-
with:
50-
path: |
51-
~/.gradle/caches
52-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
53-
restore-keys: |
54-
${{ runner.os }}-gradle-
55-
- name: Run Gradle Build for example/android/
56-
working-directory: example/android
57-
run: ./gradlew assembleDebug --no-daemon --build-cache
58-
59-
# Gradle cache doesn't like daemons
60-
- name: Stop Gradle Daemon
61-
working-directory: example/android
62-
run: ./gradlew --stop
63-
64-
build_old:
65-
name: Build Android Example App (old architecture)
66-
runs-on: ubuntu-latest
67-
steps:
68-
- uses: actions/checkout@v4
69-
- uses: oven-sh/setup-bun@v2
70-
71-
- name: Install npm dependencies (bun)
72-
run: bun install
73-
74-
- name: Disable new architecture in gradle.properties
75-
run: sed -i "s/newArchEnabled=true/newArchEnabled=false/g" example/android/gradle.properties
76-
77-
- name: Setup JDK 17
78-
uses: actions/setup-java@v4
41+
uses: actions/setup-java@v5
7942
with:
8043
distribution: "zulu"
8144
java-version: 17

.github/workflows/build-ios.yml

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ env:
3232
USE_CCACHE: 1
3333

3434
jobs:
35-
build_new:
36-
name: Build iOS Example App (new architecture)
35+
build:
36+
name: Build iOS Example App
3737
runs-on: macOS-15
3838
steps:
3939
- uses: actions/checkout@v4
@@ -59,53 +59,7 @@ jobs:
5959
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
6060
restore-keys: |
6161
${{ runner.os }}-pods-
62-
- name: Install Pods
63-
working-directory: example/ios
64-
run: pod install
65-
- name: Build App
66-
working-directory: example/ios
67-
run: "set -o pipefail && xcodebuild \
68-
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
69-
-derivedDataPath build -UseModernBuildSystem=YES \
70-
-workspace NitroSQLiteExample.xcworkspace \
71-
-scheme NitroSQLiteExample \
72-
-sdk iphonesimulator \
73-
-configuration Debug \
74-
-destination 'platform=iOS Simulator,name=iPhone 16' \
75-
build \
76-
CODE_SIGNING_ALLOWED=NO"
77-
78-
build_old:
79-
name: Build iOS Example App (old architecture)
80-
runs-on: macOS-15
81-
steps:
82-
- uses: actions/checkout@v4
83-
- uses: oven-sh/setup-bun@v2
8462
85-
- name: Install npm dependencies (bun)
86-
run: bun install
87-
88-
- name: Disable new architecture in Podfile
89-
run: sed -i "" "s/ENV\['RCT_NEW_ARCH_ENABLED'\] = '1'/ENV['RCT_NEW_ARCH_ENABLED'] = '0'/g" example/ios/Podfile
90-
91-
- name: Restore buildcache
92-
uses: mikehardy/buildcache-action@v2
93-
continue-on-error: true
94-
95-
- name: Setup Ruby (bundle)
96-
uses: ruby/setup-ruby@v1
97-
with:
98-
ruby-version: 3.3.0
99-
bundler-cache: true
100-
working-directory: example/ios
101-
102-
- name: Restore Pods cache
103-
uses: actions/cache@v4
104-
with:
105-
path: example/ios/Pods
106-
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
107-
restore-keys: |
108-
${{ runner.os }}-pods-
10963
- name: Install Pods
11064
working-directory: example/ios
11165
run: pod install

.github/workflows/lint-typescript.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,38 @@ jobs:
3636
name: Compile TypeScript (tsc)
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4040
- uses: oven-sh/setup-bun@v2
4141
- uses: reviewdog/action-setup@v1
4242

4343
- name: Install npm dependencies (bun)
4444
run: bun install
4545

46-
- name: Run TypeScript (tsc)
46+
- name: Run TypeScript (tsc) in example
47+
working-directory: example
48+
run: |
49+
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=any -tee
50+
env:
51+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Run TypeScript (tsc) in react-native-nitro-sqlite
54+
working-directory: package
4755
run: |
48-
bun typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
56+
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=any -tee
4957
env:
5058
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5159

5260
lint:
5361
name: Lint TypeScript (eslint, prettier)
5462
runs-on: ubuntu-latest
5563
steps:
56-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v5
5765
- uses: oven-sh/setup-bun@v2
58-
- uses: reviewdog/action-setup@v1
5966

6067
- name: Install npm dependencies (bun)
6168
run: bun install
6269

63-
- name: Run ESLint CI in example/
64-
working-directory: example
65-
run: bun lint-ci
66-
- name: Run ESLint CI in react-native-nitro-sqlite
67-
working-directory: package
68-
run: bun lint-ci
69-
70-
- name: Run ESLint with auto-fix in example/
70+
- name: Run ESLint with auto-fix in example
7171
working-directory: example
7272
run: bun lint
7373
- name: Run ESLint with auto-fix in react-native-nitro-sqlite

.prettierignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*.html
2+
*.yml
3+
*.yaml
4+
*.css
5+
*.scss
6+
*.md
7+
*.markdown
8+
9+
package/lib
10+
11+
.well-known
12+
android
13+
ios
14+
vendor
15+
package.json
16+
package-lock.json
17+
18+
# The GH actions don't seem to compile and verify themselves well when Prettier is applied to them
19+
.github/actions/javascript/**/index.js
20+

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
quoteProps: 'consistent',
3+
singleQuote: true,
4+
tabWidth: 2,
5+
trailingComma: 'all',
6+
useTabs: false,
7+
singleAttributePerLine: true,
8+
semi: false,
9+
}

.vscode/settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"[javascript]": {
3-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
3+
"editor.defaultFormatter": "esbenp.prettier-vscode"
44
},
55
"[javascriptreact]": {
6-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
77
},
88
"[typescript]": {
9-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
1010
},
1111
"[typescriptreact]": {
12-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
1313
}
1414
}

.watchmanconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

0 commit comments

Comments
 (0)